Rename scancode to keycode.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
This commit is contained in:
parent
376a8255a9
commit
1af06d3d46
78 changed files with 736 additions and 299 deletions
|
|
@ -26,9 +26,9 @@
|
|||
func _input_event(event):
|
||||
# Record keys.
|
||||
if event is InputEventKey and event.pressed and !event.echo:
|
||||
keys_typed.append(OS.get_scancode_string(event.scancode))
|
||||
keys_typed.append(OS.get_keycode_string(event.keycode))
|
||||
# Quit on Escape press.
|
||||
if event.scancode == KEY_ESCAPE:
|
||||
if event.keycode == KEY_ESCAPE:
|
||||
quit = true
|
||||
# Quit on any mouse click.
|
||||
if event is InputEventMouseButton:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue