You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
● Key physical_keycode [default: 0]set_physical_keycode(value) setterget_physical_keycode() getter
Represents the physical location of a key on the 101/102-key US QWERTY keyboard, which corresponds to one of the Key constants.
To get a human-readable representation of the InputEventKey, use OS.get_keycode_string(event.keycode) where event is the InputEventKey.
A) The example doesn't use physical_keycode.
B) This will return the QWERTY keys, not the actual key letter the user should see if they're using a non-QWERTY layout.
The way to get the correct representation is OS.get_keycode_string(DisplayServer.keyboard_get_keycode_from_physical(event.physical_keycode))
I'm just opening an issue to correspond with a PR I'm writing.
Steps to reproduce
Look at the InputEventKey documentation.
Minimal reproduction project
N/A.
The text was updated successfully, but these errors were encountered:
It might also be worth noting in the documentation that key_label and keycode are not set for key bindings that use the physical key (which is the default for adding actions).
Godot version
4.1.1.stable.official
System information
Windows 10, Vulkan forward +
Issue description
Current documentation:
A) The example doesn't use physical_keycode.
B) This will return the QWERTY keys, not the actual key letter the user should see if they're using a non-QWERTY layout.
The way to get the correct representation is
OS.get_keycode_string(DisplayServer.keyboard_get_keycode_from_physical(event.physical_keycode))
I'm just opening an issue to correspond with a PR I'm writing.
Steps to reproduce
Look at the InputEventKey documentation.
Minimal reproduction project
N/A.
The text was updated successfully, but these errors were encountered: