feat: opt-in Windows layout-aware shortcut chords - #269
Guffawaffle wants to merge 6 commits into
Conversation
netniV
left a comment
There was a problem hiding this comment.
This feels like overkill. If the unity engine is capable of working both ways, we should be simply following what the game currently does. If we should override that, it is surely as simple as updating which mode it's operating in?
Additionally, we are resolving shortcuts during a keyframe in the key functions adding overhead.
Keyboard layouts change by nationality in more ways than just the alphabetic keys.
|
Ooo, I'll dig into this—thanks for the pointer! You're right, I should keep it slimmer, as always 😄 This already uses Unity's FindKeyOnCurrentKeyboardLayout to bridge layout-aware letters into our existing KeyCode polling, so configured Z follows the active layout. But the docs point to a cleaner change-notification approach that could move the layout checks out of the shortcut-query path. I'll investigate that, along with whether there's a simpler mode-setting option available to us. A–Z was deliberately the first slice, but fair point that layouts differ beyond letters too. I'll keep that distinction explicit while slimming this down. |
3b229c6 to
e8a4883
Compare
|
This has been confirmed functional by the requesting user. |
# Conflicts: # mods/src/patches/mapkey.cc # tests/shortcut_hint_cache.cc # xmake.lua
Adds opt-in Windows keyboard-layout-aware shortcuts. Letters and punctuation follow the active layout, including the Shift needed to type a character—for example,
/uses Shift+7 on German keyboards.Physical mode remains the default. Restart after changing the setting; subsequent keyboard-layout changes apply live. Displayed bindings retain their configured TOML text.
Mappings refresh through device notifications, without polling. Held keys are suppressed during transitions, and unresolved characters are disabled individually. Characters requiring inferred Ctrl/Alt/AltGr are unsupported.
Windows x64 only. Selecting layout mode on macOS disables printable bindings; use physical mode there. Layout-required modifiers can make existing bindings overlap; see layout behavior and configuration.