mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 11:56:49 +01:00
Use current keyboard layout in OS_X11::keyboard_get_scancode_from_physical.
This commit is contained in:
parent
6d6f7a0d53
commit
db0014d68a
@ -4314,7 +4314,7 @@ uint32_t OS_X11::keyboard_get_scancode_from_physical(uint32_t p_scancode) const
|
|||||||
unsigned int modifiers = p_scancode & KEY_MODIFIER_MASK;
|
unsigned int modifiers = p_scancode & KEY_MODIFIER_MASK;
|
||||||
unsigned int scancode_no_mod = p_scancode & KEY_CODE_MASK;
|
unsigned int scancode_no_mod = p_scancode & KEY_CODE_MASK;
|
||||||
unsigned int xkeycode = KeyMappingX11::get_xlibcode((uint32_t)scancode_no_mod);
|
unsigned int xkeycode = KeyMappingX11::get_xlibcode((uint32_t)scancode_no_mod);
|
||||||
KeySym xkeysym = XkbKeycodeToKeysym(x11_display, xkeycode, 0, 0);
|
KeySym xkeysym = XkbKeycodeToKeysym(x11_display, xkeycode, keyboard_get_current_layout(), 0);
|
||||||
if (xkeysym >= 'a' && xkeysym <= 'z') {
|
if (xkeysym >= 'a' && xkeysym <= 'z') {
|
||||||
xkeysym -= ('a' - 'A');
|
xkeysym -= ('a' - 'A');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user