Linux - Synchronize NumLock, CapsLock & ScrollLock
NumLock, CapsLock & ScrollLock work correctly when the terminal window is active. However, if I click somewhere else, change the state of these keys and then click back to the terminal window, it works in the opposite direction.
I suggest upon re-activating the terminal window to check the state of these flags and send to the terminal virtual e.g. NumLock press if it is not synchronized. To my surprise, the current API of browsers allows to check the state of NumLock / CapsLock / ScrollLock - https://www.w3schools.com/jsref/event_mouse_getmodifierstate.asp
A PR would be welcome.
Ok, I will prepare Pull Request for this issue.
I'm not sure there will be a satisfying solution for this, since we don't know the state of these flags in the guest OS (even if we knew the initial state on boot for every OS, it could be changed by a different mechanism, e.g. by remapping the key inside of the guest).
A proper solution would be a guest agent to synchronise this, but it's probably not worth the effort. So even though this issue is valid, I will close this.