[X11] Use current keyboard layout in OS_X11::keyboard_get_scancode_from_physical.

This commit is contained in:
bruvzg 2023-06-13 09:29:08 +03:00
parent f386252dde
commit 9461923eff
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38
1 changed files with 1 additions and 1 deletions

View File

@ -4441,7 +4441,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');
} }