Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

physical_keycode differs between X11 and wayland #99008

Open
jrb0001 opened this issue Nov 9, 2024 · 3 comments
Open

physical_keycode differs between X11 and wayland #99008

jrb0001 opened this issue Nov 9, 2024 · 3 comments

Comments

@jrb0001
Copy link

jrb0001 commented Nov 9, 2024

Tested versions

Reproducible in:

System information

Godot v4.4.dev4 - Arch Linux #1 SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:41 +0000 on Wayland - X11 display driver, Multi-window, 3 monitors - Vulkan (Mobile) - dedicated AMD Radeon RX 6900 XT (RADV NAVI21) - AMD Ryzen 9 3950X 16-Core Processor (32 threads)

Issue description

On a swiss german keyboard layout, the physical_keycode of the § and < keys are swapped on Wayland compared to X11. keycode and key_label are the same. The keys Ü and ¨ have different physical_keycode and keycode, but the same key_label. I tested a few other ISO layouts and they had the same issue.

Keyboard X11 physical_keycode Wayland physical_keycode X11 keycode Wayland keycode X11 key_label Wayland key_label
§ (below Esc) 96 167 167 167 167 167
< (left of Y) 167 96 60 60 60 60
Ü (right of P) 91 123 91 123 220 220
¨ (right of Ü) 93 125 93 125 93 125

Steps to reproduce

You need a keyboard with a physical ISO layout. JIS apparently works correctly (#99008 (comment)). No idea about ANSI.

Open the attached MRP and set display/display_server/driver.linuxbsd to x11 or wayland. Start the project, press the keys from the table above and check the values in the output tab in the editor.

Minimal reproduction project (MRP)

bug-physical_key.zip

@buresu
Copy link
Contributor

buresu commented Dec 11, 2024

@jrb0001 Hello, I have changed the keycode system for japanese on Wayland in the current master(a40fc23). How about the current test results?

@jrb0001
Copy link
Author

jrb0001 commented Dec 23, 2024

@buresu Unfortunately no change at all.

@buresu
Copy link
Contributor

buresu commented Jan 3, 2025

@jrb0001 Thank you for checking.
I tested by setting a Swiss German keyboard layout in a Japanese keyboard environment and checked the key codes, and it seems that correct values are being obtained regardless of my changes.
Since "<" does not physically exist on Japanese keyboards, I checked "§", "Ü", and "¨".
This may only serve as a reference since the physical keyboards are not exactly the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants