Synchronize HID keyboard state on first event

When an AOA HID keyboard is registered, CAPSLOCK and NUMLOCK are both
disabled, regardless of the state of the computer keyboard.

To synchronize the state, on first key event, inject CAPSLOCK and/or
NUMLOCK if necessary.
This commit is contained in:
Romain Vimont
2021-10-21 20:44:19 +02:00
parent 511356710d
commit c96874b257
2 changed files with 50 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ struct sc_hid_keyboard {
struct sc_aoa *aoa;
bool keys[SC_HID_KEYBOARD_KEYS];
bool mod_lock_synchronized;
};
bool