Skip to content

Several enhancements and proposals#17

Open
troycurtisjr wants to merge 17 commits into
srwi:masterfrom
troycurtisjr:iris-vial
Open

Several enhancements and proposals#17
troycurtisjr wants to merge 17 commits into
srwi:masterfrom
troycurtisjr:iris-vial

Conversation

@troycurtisjr
Copy link
Copy Markdown

This project is exactly what I have been looking for, and tried to poorly implement with a static keymap image and a file preview tool launched from a keybinding! I made fair number fixes and enhancements to really dial it to my use case, most/all of which I think others could find useful.

I recognize this isn't a great PR, it does a lot of different things, mixing both features and fixes together. I think it could all be merged in, but I also understand there may be some choices that aren't applicable with your vision of the project. So this is more like a menu of things to look at. If you want to cherry pick specific items that is great. If you want to ask me to try extracting out specific things you are interested in as a separate PR, definitely ask.

Also, I'm not a rust programmer. I really endeavored to ensure this isn't AI slop, but most of the credit of the changes goes to Gemini CLI, and I can really only give a quick pass to ensure things don't look ridiculously busted.

Fixes

  • The layout for my split keyboard with rotated thumb keys did not render correctly, so I got it fixed.
  • Added the Tap Dance codes
  • Fixed some alternate color bleed from the base label (my homerow mods on the base layer caused the alt rendering on the other layers)
  • My right modifiers rendered as MOD_LCTL | MOD_RCTL and MOD_LSFT | MOD_RCTL, and so on. As I switched to symbols, no distinction was needed anyway, so I just dropped that and displayed just the single modifier.
  • Fix highlighting on short duration keys. On my tap-hold keys, the "tap" action was apparently sent to the computer with an extremely short duration, so the highlight is often missed. Implemented a min hold so that the key will always light up. I never saw this issue on typical keys

Features

  • Changed all modifiers (gui, alt, control, shift) to use symbols, and switched Gui to the diamond used in the ergomech circles and drop the Windows logo
  • Rendered Tap Hold keys with the hold key at the bottom of the key with a darkened background
  • Changed the rendering of shifted keys, to just show the shifted key (* instead of LSFT(* 8))
  • Changed some of the mouse buttons to icons: left, middle, right click, movement direction, scroll direction
  • Added an option to autoconnect to the last connected keyboard on startup
  • Added cli option for --toggle that would message the running process to show or high the keys
  • Added a configuration option to disable the automatic display on layer change
  • Added cli option for --settings to redisplay the settings when autoconnect is on

The idea for the last set of changes is to enable binding the display to a keyboard shortcut for on demand display and hiding. I mostly don't want it to show up, even on layer channels, but want it easily available for a reference.

Testing

I only have one keyboard, running Vial. I tried to ensure the changes were compatible with ZMK and QMK, but I don't have those to actually test with.

Currently, I've only tested everything on Linux. I will move it to my work laptop which is MacOS soon, but it will be a bit before I could try it on Windows.

Details

Here are some screenshot details so demonstrate what I described above.

Layout fix

For the layout fix, I did want to show a before an after. This is the before

Screenshot From 2026-05-05 18-51-22

And then after:

Screenshot From 2026-05-04 21-35-29

Modifier symbols and tap-hold rendering

Screenshot-1

The mouse symbols

Screenshot-2

urielpappilon added a commit to urielpappilon/keypeek that referenced this pull request May 18, 2026
mine/mod-label-style adds a text/symbols toggle for KeycodeKind::Modifier
keys, but only for the tap-side label and only when both tap and symbol
are present on the same LayoutKey. ZMK mod-tap (e.g. &mt LSHIFT A) goes
through Behavior::ModTap, which hardcoded the hold label to the symbol
if available (the helper picked one at construction time), so the
toggle never affected the hold portion of mod-tap keys — they always
rendered as the symbol regardless of setting.

Fix by carrying both text and symbol through to render time:

- Add LayoutKey.hold_symbol: Option<String>, defaulted to None.
- Update Behavior::ModTap in zmk_keycode_labels/behavior.rs to populate
  hold = Some(hold_key.tap) and hold_symbol = hold_key.symbol, instead
  of collapsing them at construction. LayerTap explicitly sets
  hold_symbol: None (layer holds aren't modifiers).
- Extend the shadow logic at the top of generate_key_label_galleys to
  also clear the inactive of hold/hold_symbol when the setting calls
  for it. The hold-render branch now falls back to hold_symbol when
  hold is None.

Default on main is Symbols, so visible behavior is unchanged from the
prior always-symbol render. The difference: switching to Text now
actually flips mod-tap hold labels to text, where before it had no
effect on them.

This change is local to main and depends on PR srwi#17's hold-rendering
path; it isn't part of the upstream mine/mod-label-style branch
because upstream doesn't display hold labels at all.
@srwi
Copy link
Copy Markdown
Owner

srwi commented May 27, 2026

Hi! First of all I apologize for the very late response and thank you for working on KeyPeek. I'm glad you like it and that you're interested in shaping it in a way that best fits your needs.

As you already said, this is quite a large PR with lots of different suggestions, which is part of why I've been postponing it so far. Another reason is that I've been enjoying programming a bit less since agentic coding became so good, so I'm currently focusing more on other things. However I do like your suggestions and the screenshots look great, so I think I'll come back to it and cherry-pick changes once I get back to working on KeyPeek again. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants