Repository navigation
feat(windows): hotkeys another app has taken can be tried again from Settings - #19
Merged
Merged
Conversation
…Settings When another app holds a hotkey's keys, snapr couldn't register it and the only way to get it back was to restart snapr. The Hotkeys page now says how many hotkeys are unavailable, marks each one, and has a Try again button that registers them again once the other app lets go. snapr opens on the Hotkeys page when one fails at startup.
CubityFirst
force-pushed
the
feat/reload-hotkeys-indicator
branch
from
November 24, 2026 18:08
2dfe95b to
5309277
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows another app can grab snapr's hotkey keys, for example when snapr restarts after it. snapr then can't register them, and until now the only fix was quitting and starting snapr again. It also wasn't clear which hotkeys had stopped working.
Now Settings > Hotkeys shows a card saying how many hotkeys are unavailable, with a Try again button. Each affected hotkey gets an Unavailable tag, and hovering it shows why. Try again only retries the hotkeys that failed and leaves the working ones alone. When a hotkey fails at startup, snapr opens on the Hotkeys page instead of General. The card is hidden on Linux desktops that manage the keys themselves.
Proof: on Windows, a helper process held three of the configured hotkeys with
RegisterHotKey, and a fourth key was left free. snapr started on Hotkeys with the card and three tags. Try again while the keys were still held kept the card and showed "3 hotkeys are still unavailable". After the helper let go, Try again registered all three (another process'sRegisterHotKeythen failed on them), and the free key stayed registered the whole time. Also rancargo clippy --all-targets -D warningsandcargo test(189 passed after rebasing onto main).Reviewed with sol-loop: 3 rounds with GPT-6.2 Sol. Sol verdict: approved