You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add InputEventKey.location to tell left from right
This adds a new enum `KeyLocation` and associated property `InputEventKey.location`, which indicates the left/right location of key events which may come from one of two physical keys, eg. Shift, Ctrl. It also adds simulation of missing Shift KEYUP events for Windows. When multiple Shifts are held down at the same time, Windows natively only sends a KEYUP for the last one to be released.
This commit is contained in:
@@ -124,6 +124,7 @@ void AndroidInputHandler::process_key_event(int p_physical_keycode, int p_unicod
|
||||
ev->set_physical_keycode(physical_keycode);
|
||||
ev->set_key_label(fix_key_label(p_key_label, keycode));
|
||||
ev->set_unicode(fix_unicode(unicode));
|
||||
ev->set_location(godot_location_from_android_code(p_physical_keycode));
|
||||
ev->set_pressed(p_pressed);
|
||||
ev->set_echo(p_echo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user