Skip to content

BUG: Hotkey only registers Left Ctrl/Alt; Right-side modifiers are not detected #1

@Arezhik

Description

@Arezhik

Bug: Global hotkey ignores Right Ctrl / Right Alt and mixed Left+Right modifier combinations

Summary

The global activation/deactivation hotkey only recognizes the left-side Ctrl and Alt keys. The right-side Ctrl and Alt keys (to the right of the spacebar) are completely ignored, and any combination that mixes left + right modifiers also fails.

Expected Behavior

The hotkey should work with any combination of physical Ctrl and Alt keys:

  • Left Ctrl + ... ✓ works
  • Right Ctrl + ... → should work
  • Left Alt + ... ✓ works
  • Right Alt + ... → should work
  • Left Ctrl + Right Alt + ... → should work
  • Right Ctrl + Left Alt + ... → should work

Actual Behavior

Only the left-side modifiers are detected. Using Right Ctrl, Right Alt, or any mixed left/right combination does nothing – the overlay will not activate or deactivate.

Steps to Reproduce

  1. Make sure the app is running in the background.
  2. Press the configured hotkey using only the Right Ctrl or Right Alt key(s).
  3. Try mixed combinations (e.g., hold Left Ctrl and press Right Alt as part of the sequence, or vice-versa).

→ Overlay does not appear/disappear.

Environment

  • OS: Windows 11 24H2 (build 26100.2161) – also reproduced on Windows 10 22H2
  • Keyboard layout: US QWERTY (standard 104-key layout)
  • Tested keyboards: logitech wireless keyboard, assume other keyboard are the same.

Additional Notes

This is a common pitfall when using RegisterHotKey() or low-level keyboard hooks (LLKBDHOOK) without properly handling extended key flags (VK_LCONTROL / VK_RCONTROL, VK_LMENU / VK_RMENU, and the extended-key bit in lParam).

Possible Root Cause (for developer)

The hotkey registration or hook likely checks only for VK_CONTROL / VK_MENU without distinguishing left vs right and without setting the extended-key flag when required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions