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
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