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:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user