Closed mtlynch closed 1 year ago
A user has reported that this implementation is causing issues when they are testing video games. In their example the user is trying to move their character using the WASD keys rather than the arrow keys or any modifiers.
I realize this is actually a dupe of #821
TinyPilot automatically releases keys after the keydown event and ignores the keyup event from the browser (except for modifier keys).
The idea was to prevent keys from ever seeming "stuck" due to network latency (e.g., keydown and keyup events happen 20ms apart, but due to network latency, they arrive to TinyPilot 2s apart and result in repetition of the keystroke on the target machine).
It was part of the initial TinyPilot implementation, and it was just something I did on a hunch and not something that's based on actual user reports. It's possible that just honoring keyup will work fine.
But if not, it would be good to give the user some option where they can choose to enable long keypresses at the risk of repeating keys in the case of latency. On decently fast networks, everything should work fine.