Skip to content

inputs-channel: Attempt to have a reliable led state

Olivier Fourdan requested to merge ofourdan/spice:modifiers-sync into master

We can not consider the qemu led state to be reliable. It by default has 50ms of delay, so if we want to achieve something reliable, this won't do.

We need to keep our own internal state, and consider it as reliable. We update it immediately after receiving the key presses, meaning that this is now the future state of the guest.

When we receive a keymap event, we check against this 'ideal' state and only update the guest if we 'counted' that it won't have the correct state.

When the guest notifies its change, the modifiers_watch is supposed to fix any wrong state.

Edited by Olivier Fourdan

Merge request reports