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:
bruvzg
2018-04-05 20:59:35 +03:00
parent 376a8255a9
commit 1af06d3d46
78 changed files with 736 additions and 299 deletions

View File

@ -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: