dfterm3 icon indicating copy to clipboard operation
dfterm3 copied to clipboard

Stuck keys cause strange behavior

Open lethosor opened this issue 11 years ago • 3 comments

http://24.192.11.199:8080/playing/# Pressing shift (just shift) zooms directly to a certain location. This means that < and > also don't work because they require pressing "shift" first. One possibility is that the JS keycode for Shift (16) is being translated to a function key at some point (F1-F4 and shift-F3 are the only hotkeys currently set up, so it's probably one of those)

lethosor avatar Feb 23 '14 22:02 lethosor

Most likely F4, which zooms to the relevant area. Shift-F3 is impossible to test because it uses shift.

lethosor avatar Feb 23 '14 22:02 lethosor

Okay, this has disappeared for me, again for no obvious reason. I'm closing this unless it comes up again (which it probably will as soon as I close it :P )

lethosor avatar Feb 23 '14 22:02 lethosor

Okay, I've narrowed this down to stuck keys. I recently had an issue in the game linked above where pressing "shift" would cause the view/menu to move up until the up arrow was pressed and released. After I pressed each of the function and number keys, the problem disappeared, so I think one of those keys had been pressed but hadn't been released. I suspect there is a problem with key release events not always being received (for example, due to closing the window while holding down a key). I'm fairly certain that this wasn't another player actively holding down a key because the previous player listed at the top was no longer logged in. One possible workaround is to release keys when a player disconnects, although it would require additional communication between the server and DF (and I'm not sure if it's the only way to trigger this problem). Another option, which is less transparent but probably more reliable, is a "release all keys" option in the web UI.

lethosor avatar Feb 25 '14 20:02 lethosor