Skip to content

fix: match only required modifiers for popup hotkey - #12

Merged
noxygalaxy merged 1 commit into
MoonMonet:mainfrom
gmcky:fix/popup-hotkey
Aug 5, 2026
Merged

fix: match only required modifiers for popup hotkey#12
noxygalaxy merged 1 commit into
MoonMonet:mainfrom
gmcky:fix/popup-hotkey

Conversation

@gmcky

@gmcky gmcky commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The Ctrl+C+C popup stops working after the global open hotkey is used once.

Cause: the double-copy detector (setup_global_shortcut) mirrors modifier state
from a global rdev listener into ctrl/shift/alt/meta booleans. That mirror can
desync: when the open hotkey fires, a modifier KeyRelease can be missed, so a
modifier stays flagged as held even though it is physically up. This is a state
bug in the tracker, not a physically stuck key.

The detector then required exact modifier equality with the combo, so a
phantom-held Shift/Alt made a real Ctrl+C no longer match, and the popup went
dead until that modifier was pressed and released again (which resyncs it).

Fix: match only the modifiers the combo requires and ignore extras, so phantom
modifier state can no longer block the combo. This restores the behavior from
before the configurable-hotkey refactor.

Repro (before this change):

  1. Use the open hotkey (e.g. Ctrl+Shift+T) once.
  2. Select text in another app, press Ctrl+C twice.
  3. Popup does not appear. Tapping Shift/Alt makes it work again.

Verify:

  • cargo check passes (only pre-existing warnings)
  • manual (Windows): open hotkey, then double-copy from an unfocused app, popup appears
  • Linux/X11: same behavior confirmed (Wayland global capture is unsupported by rdev)

@gmcky
gmcky marked this pull request as ready for review August 5, 2026 11:38
@noxygalaxy
noxygalaxy merged commit 61f54fb into MoonMonet:main Aug 5, 2026
3 checks passed
@gmcky
gmcky deleted the fix/popup-hotkey branch August 5, 2026 15:11
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.

2 participants