tinypilot icon indicating copy to clipboard operation
tinypilot copied to clipboard

Add NumLock to on-screen keyboard

Open mtlynch opened this issue 4 years ago • 4 comments

The TinyPilot on-screen keyboard has no NumLock. This can lead to a case where the NumLock on the user's keyboard is out of state with the remote system:

https://forum.tinypilotkvm.com/-172/numlock-and-ten-key-numbers-issue

Workaround

In the meantime, the user can work around this by pasting the following snippet in their browser's JavaScript console:

let key = document.getElementById("on-screen-keyboard").shadowRoot.querySelector('keyboard-key[code="ScrollLock"]');
key.innerText = "Num Lock"
key.code = "NumLock"

This temporarily converts the Scroll Lock key on the on-screen keyboard to a Num Lock key.

image

mtlynch avatar Nov 03 '21 22:11 mtlynch