[🐞 BUG] keyboard shortcut UI doesn't render `§`/`±` key
Describe the bug
If you assign a hotkey to use the section sign/plus-minus key, then the UI will show the selected hotkey as an empty box, or a modifier plus end of input.
On an Apple UK keyboard layout, this key is located On the left edge of the keyboard between the esc and tab keys, to the left of key 1.
To Reproduce Steps to reproduce the behavior:
- Go to: Preferences > Global Hotkey.
- Click on
Changefor any of the hotkeys. - Press the section sign key, with or without any modifier keys.
- Witness the UI showing currently selected hotkey become a blank box or the modifier key without the section sign key.
Expected behavior The currently selected hotkey UI should show the section sign symbol along with any modifier.
Screenshots
Environment:
- macOS Version: Tahoe 26.2 (25C56)
- App Version: 1..5.5 (1) - also previous version
- Architecture: Apple Silicon
Additional context I'm in the UK, this laptop has the Apple UK keyboard layout
Crash Logs N/A
I cannot see them in my keeyboard or how to enable them, so cannot reproduce it unfortunately.
On MacOS you can change layouts via
System Settings > Keyboard > Text Input > Input Sources, click Edit, add "British" or "British - PC,"
Though I'm not quite sure if this will let you reproduce as there are some differences in the number of and positioning of the physical keys too
If you or someone wants to take this and send in a fix, happy to merge it. I am not able to work on this as I cannot reproduce the key combo etc. Thanks!
Fix submitted in #258.
The root cause: the app had a hardcoded table mapping key codes to US keyboard characters. Key code 10 (the §/± key on British keyboards) was missing entirely, and the fallback converted the raw number to a Unicode character — key code 10 becomes a line feed control character, which is invisible.
Beyond the reported key, the same table was also wrong for other non-US layouts (e.g. German, French) where punctuation keys produce different characters than on a US keyboard.
The fix replaces the hardcoded character table with a layout-aware lookup that asks macOS what each key actually produces on the user's current keyboard. Semantic key names (Return, Tab, Space, etc.) are still hardcoded since the name is more useful than the character. A US QWERTY fallback is kept for edge cases where layout data isn't available.