Closed stephanbogner closed 2 years ago
Physical events use physical_scancode
instead.
@KoBeWi Wow that reply was fast! Thanks for the clarification! ❤️ (As this solves my question I am closing the issue)
I also discovered issue 3571 now which helped me understand a bit more.
I don't really understand why there are separate ways to get the scancode, as the physical_scancode
for non-physical keys is 0
(so it seems streamlining to scancode
could make sense) ... but I am still learning so there probably is a good reason 🙂
func _ready():
print('Physical:')
var action_physical = InputMap.get_action_list("debug_button")[0]
print('scancode_physical: ', action_physical.physical_scancode )
print('scancode: ', action_physical.scancode )
print('')
print('Not physical:')
var action = InputMap.get_action_list("debug_button")[1]
print('scancode_physical: ', action.physical_scancode )
print('scancode: ', action.scancode )
Physical:
scancode_physical: 32
scancode: 0
Not physical:
scancode_physical: 0
scancode: 32
Where did get_action_list go? It doesn't work anymore, anything changed?
Godot version
v3.4.4.stable.official
System information
macOS Monterey 12.1
Issue description
I am not sure if this is the intended behaviour when working with physical keys, because I didn't find any information in the docs about this.
Description:
0
.32
for thespace
-bar)Expectation:
WASD
equalsZQSD
on a French keyboard:W
-key (scancode87
) would refer to theZ
-key on a French keyboard and thus return the scancode90
Context
Steps to reproduce
Input map
Code
Output
Minimal reproduction project
No response