1
0
Fork 0
godot/platform/linuxbsd/wayland
Riteo 54755a27e9 Wayland: Unstuck keys with same keycode
This fixes once and for all the core issue of different Godot `keycode`s
released from the same raw XKB keycode.

The `InputEventKey` `keycode` value _should_ map to the "unmodified"
key, but unfortunately there's an ambiguity with their encoding for
"special" keys ("delete", "insert", etc.), in witch they ignore their
unicode representation. This means that a key that is special when plain
but a character when modified would never be properly picked up, so we
do indeed change its keycode. As a consequence of this exception, some
Godot keys never receive release events and get "stuck".

This patch adds an extra check through an `HashMap` to "unstuck" keys
that changed while having the same keycode.

I also could not resist simplifying a bit the regular key event
generation method but this makes things more consistent and predictable
IMO.
2025-02-11 13:16:16 +01:00
..
dynwrappers Add Wayland support 2024-01-30 16:44:47 +01:00
SCsub SCons: Properly `NoCache` all text files 2025-01-16 16:59:12 -06:00
detect_prime_egl.cpp EGL: Use EGL_EXT_platform_base whenever possible 2024-06-04 08:43:34 +02:00
detect_prime_egl.h EGL: Use EGL_EXT_platform_base whenever possible 2024-06-04 08:43:34 +02:00
display_server_wayland.cpp Merge pull request #101812 from bruvzg/portal_chk 2025-02-03 08:16:10 -06:00
display_server_wayland.h Merge pull request #101987 from Riteo/imagine-using-rids 2025-01-31 09:15:52 -06:00
egl_manager_wayland.cpp Add Wayland support 2024-01-30 16:44:47 +01:00
egl_manager_wayland.h Add Wayland support 2024-01-30 16:44:47 +01:00
egl_manager_wayland_gles.cpp Wayland: Add support for OpenGL ES driver 2024-05-03 05:17:13 +02:00
egl_manager_wayland_gles.h Wayland: Add support for OpenGL ES driver 2024-05-03 05:17:13 +02:00
key_mapping_xkb.cpp Wayland: Unstuck keys with same keycode 2025-02-11 13:16:16 +01:00
key_mapping_xkb.h Wayland: Unstuck keys with same keycode 2025-02-11 13:16:16 +01:00
rendering_context_driver_vulkan_wayland.cpp Move Vulkan includes to a central godot_vulkan.h header 2024-09-29 17:53:18 +02:00
rendering_context_driver_vulkan_wayland.h Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
wayland_thread.cpp Wayland: Unstuck keys with same keycode 2025-02-11 13:16:16 +01:00
wayland_thread.h Wayland: Unstuck keys with same keycode 2025-02-11 13:16:16 +01:00