You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[X11] Fix keyboard_get_label_from_physical errors when used on key without label.
This commit is contained in:
@@ -3746,8 +3746,11 @@ Key DisplayServerX11::keyboard_get_label_from_physical(Key p_keycode) const {
|
|||||||
Key key = KeyMappingX11::get_keycode(xkeysym);
|
Key key = KeyMappingX11::get_keycode(xkeysym);
|
||||||
#ifdef XKB_ENABLED
|
#ifdef XKB_ENABLED
|
||||||
if (xkb_loaded_v08p) {
|
if (xkb_loaded_v08p) {
|
||||||
String keysym = String::chr(xkb_keysym_to_utf32(xkb_keysym_to_upper(xkeysym)));
|
char32_t chr = xkb_keysym_to_utf32(xkb_keysym_to_upper(xkeysym));
|
||||||
key = fix_key_label(keysym[0], KeyMappingX11::get_keycode(xkeysym));
|
if (chr != 0) {
|
||||||
|
String keysym = String::chr(chr);
|
||||||
|
key = fix_key_label(keysym[0], KeyMappingX11::get_keycode(xkeysym));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user