Skip to content

Commit

Permalink
Merge pull request #78169 from bruvzg/3x_kbd
Browse files Browse the repository at this point in the history
[X11] Use current keyboard layout in OS_X11::keyboard_get_scancode_from_physical.
  • Loading branch information
akien-mga committed Jun 13, 2023
2 parents 60a7b83 + 9461923 commit 0d01ef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/x11/os_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 scancode_no_mod = p_scancode & KEY_CODE_MASK;
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') {
xkeysym -= ('a' - 'A');
}
Expand Down

0 comments on commit 0d01ef3

Please sign in to comment.