Closed apsun closed 6 years ago
Apparently my understanding was incorrect; the keyboard doesn't keep track of what "toggle" keys have been pressed; rather, it's the OS that's responsible for manually setting the LEDs on the keyboard (like the CapsLock LED) to match its internal keyboard state. Maybe we should do that?
Just learned that QEMU does not support setting the keyboard LEDs. Oh well.
Currently we only detect deltas, not full states. This causes 2 annoying bugs:
ON
when the machine boots, the states will be flipped (i.e.ON
->OFF
,OFF
->ON
).We can probably fix this by polling the complete modifier state every time one of them changes.