You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which brings a lot confusing when defining keybindings in configuration files and binding interactively. Some top of the head problems:
When combination like ctrl+z is defined in configuration file and user has german layout. Is action triggered when user presses Control + Z(key in the bottom row) or Control + Z(key in the top row)?
It should be possible to define specific behavior for left/right modifier keys on the opt-in basis, while having both modifier keys behave identically by default. So separate actions for leftcontrol+s and rightcontrol+s. See Keybind: differentiate between left and right modifiers #2363
when control+z is defined in config it should also be triggered when user has non-latin layout, but presses control+[key which has latin Z on it] unless a layout-specific combination is defined too, so it overrides.
Describe the solution you'd like
keymaps.toml stores keybindings in virtualkey format supporting:
two-sided controlaltshiftmeta (meta being universal for win and cmd keys too)
special characters like $, ~, * are also supported but should be used with caution, because they can be produced by different keys and unreachable combinations are very possible. So it is preferable to have control+shift+8 over control+* in default config in order to distinguish between numrow key 8 and numpad multiply.
Raw keycodes are also supported [KeyA] - [KeyZ][KeyNumPadAdd] etc, as defined in winit::keyboard::KeyCode
In keymap settings when interactively entering a key combination there should be two chekboxes:
store as raw keycodes - nitty to avoid researching actual keycode to save keycode-based keybinding
account for left/right modifier (per each modifier) - to automatically save as leftcontrol+s if indeed combination was interactively provided with left control key.
Describe alternatives you've considered
Store all keybindings in raw keycodes - works well if user uses solely US Qwerty and other non-latin layout. If user uses alternative latin layout (dvorak, colemak) this brings a ton of problems.
Is your feature request related to a problem? Please describe.
Keyboards have different:
Which brings a lot confusing when defining keybindings in configuration files and binding interactively. Some top of the head problems:
ctrl+z
is defined in configuration file and user has german layout. Is action triggered when user presses Control + Z(key in the bottom row) or Control + Z(key in the top row)?leftcontrol+s
andrightcontrol+s
. See Keybind: differentiate between left and right modifiers #2363control+z
is defined in config it should also be triggered when user has non-latin layout, but presses control+[key which has latin Z on it] unless a layout-specific combination is defined too, so it overrides.Describe the solution you'd like
keymaps.toml stores keybindings in virtualkey format supporting:
control
alt
shift
meta
(meta being universal forwin
andcmd
keys too)leftcontrol
rightcontrol
leftshift
rightshift
leftalt
rightalt
akaaltgr
a
-z
1
-0
$
,~
,*
are also supported but should be used with caution, because they can be produced by different keys and unreachable combinations are very possible. So it is preferable to havecontrol+shift+8
overcontrol+*
in default config in order to distinguish between numrow key 8 and numpad multiply.[KeyA]
-[KeyZ]
[KeyNumPadAdd]
etc, as defined inwinit::keyboard::KeyCode
In keymap settings when interactively entering a key combination there should be two chekboxes:
leftcontrol+s
if indeed combination was interactively provided with left control key.Describe alternatives you've considered
Additional context
VSCode approach
The text was updated successfully, but these errors were encountered: