Context
Reported by @haacked in Slack. On a Dvorak keyboard layout, pressing CMD+C (copy) triggers the Inbox shortcut (CMD+I) because the physical QWERTY "I" key maps to "C" in Dvorak. This makes the app unusable for non-QWERTY users since common OS shortcuts collide with app shortcuts.
Problem
We use react-hotkeys-hook v4 which matches shortcuts against event.code (physical key position) rather than event.key (logical/layout-aware character). This means all keyboard shortcuts are bound to QWERTY physical positions regardless of the user's keyboard layout.
Expected behavior
Keyboard shortcuts should respect the user's OS keyboard layout. CMD+I should trigger Inbox based on the logical "I" key, not the physical QWERTY "I" position.
Steps to reproduce
- Set macOS keyboard layout to Dvorak (or any non-QWERTY layout)
- Select text in the terminal
- Press CMD+C (Dvorak) to copy — this hits physical QWERTY "I" key
- Inbox opens instead of copying text
Possible solutions
- Upgrade to
react-hotkeys-hook v5 which adds a useKey: true option to switch to event.key matching. Note: v5 had known bugs with Dvorak/Colemak (issue #1239), partially fixed in v5.2.3.
- Implement custom key handling that uses
event.key instead of relying on the library's default event.code behavior.
References
- react-hotkeys-hook#1323 — Library does not support alternate keyboard layouts
- App version: 0.46.9, macOS arm64, Dvorak layout
Context
Reported by @haacked in Slack. On a Dvorak keyboard layout, pressing CMD+C (copy) triggers the Inbox shortcut (CMD+I) because the physical QWERTY "I" key maps to "C" in Dvorak. This makes the app unusable for non-QWERTY users since common OS shortcuts collide with app shortcuts.
Problem
We use
react-hotkeys-hookv4 which matches shortcuts againstevent.code(physical key position) rather thanevent.key(logical/layout-aware character). This means all keyboard shortcuts are bound to QWERTY physical positions regardless of the user's keyboard layout.Expected behavior
Keyboard shortcuts should respect the user's OS keyboard layout. CMD+I should trigger Inbox based on the logical "I" key, not the physical QWERTY "I" position.
Steps to reproduce
Possible solutions
react-hotkeys-hookv5 which adds auseKey: trueoption to switch toevent.keymatching. Note: v5 had known bugs with Dvorak/Colemak (issue #1239), partially fixed in v5.2.3.event.keyinstead of relying on the library's defaultevent.codebehavior.References