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
Consider someone owning a physical QWERTY keyboard:
However, they have remapped it to use Dvorak (perhaps even repainting the text on their keyboard):
If they start hitting Caps Lock and then moving to the left, the keys they will be hitting will be
physical (qwerty): CapsLock, A, S, D, F, …
logical (Dvorak): CapsLock, A, O, E, U …
The logical keys makes sense for most keyboard shortcuts - if you say "Press Cmd+S to save" in your UI, the user will be looking for the logical key "S"
The physical keys are mostly useful for games, where e.g. te physical WSAD on QWERTY moves a character, no matter what the users keymap is.
The keyboard input in egui is limited in a couple of ways:
Event::Keysuper/metamodifier keyKeyboardShortcutshould ignoreshiftandaltkeys for logical keys (e.g.Ctrl Plusmay require pressing shift on some keyboards). See The keyboard shortcut of zoom in does not work on the JIS keyboard #3626 for moreHow can I help?
egui::Keyand follow the instructions there for adding new keysRequested keys
{and}Prioir art
winit: https://docs.rs/winit/latest/winit/event/struct.KeyEvent.htmlRelevant issues
scancodesvia egui-winit #2977Ctrl+C/V/X) don't work with non-Latin keyboard layouts #4081Physical vs Logical keys
Consider someone owning a physical QWERTY keyboard:

However, they have remapped it to use Dvorak (perhaps even repainting the text on their keyboard):

If they start hitting Caps Lock and then moving to the left, the keys they will be hitting will be
The logical keys makes sense for most keyboard shortcuts - if you say "Press Cmd+S to save" in your UI, the user will be looking for the logical key "S"
The physical keys are mostly useful for games, where e.g. te physical WSAD on QWERTY moves a character, no matter what the users keymap is.