Closed mihaip closed 7 months ago
Tested with @joevt's Keyboard Tester app which shows the keymap. Before this patch, if you mashed on a lot of keys repeatedly, you would end up with some keys being stuck on. After this, the keymap always ends up being correctly empty.
AdbKeyboard would copy the event into its own fields and set the changed field, so that we could return the event when register was 0. However, if a subsequent event was received before ADB polling, the previous event would be overwritten and lost.
Fix this by maintaining a queue of events, so that we can return everything since the last poll.