Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
Created by: bruvzg
Commit 1: [Linux/X11] Fix non-latin keyboard layout scan-codes. (see #17827 comments). Fallback to physical scancode if layout remapping fails.
Fixes #8039
Commit 2: [Linux/X11, macOS, Windows] Add qwerty_scancode
to InputEventKey
.
Layout independent scancode, which represent the physical location on keyboard. (e.g. keys in highlighted locations will produce event with scancode
= Q, MINUS, K, C
on DVORAK-L layout, and qwerty_scancode
= W, A, S, D
on any keyboard layout.)
Edit (18 Apr.): Added ability to use QWERTY scan-codes in InputMap. Edit (32 Apr.): Added Linux/X11 modifier key fix. Edit (28 Aug.): Commit 3 moved to #31740, "Fix non-latin layout scancodes" (zero scancodes on non-latin layouts) is still relevant and fixed on freshly installed Manjaro 18/KDE.