getkey: exclude other keys during a repetition

When a key is being held and repeated, ignore other key presses
until it is released. Without this, new keys would take priority.

This is the desired behavior because pressing other keys by
accident, especially on the directional pad, is common. Besdeis
this is the system's behavior.
This commit is contained in:
lephe 2019-07-18 15:20:34 -04:00
parent 1697998a9c
commit 705854da39
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ key_event_t getkey_opt(int opt, volatile int *timeout)
/* Key press: handle modifiers or return an event */
case KEYEV_DOWN:
key = ev.key;
if(rep_key && key != rep_key) break;
/* Handle backlight on fx9860g */
#ifdef FX9860G