daimio icon indicating copy to clipboard operation
daimio copied to clipboard

Dom-on-keypress Arrow Keys

Open RobbyDuguay opened this issue 11 years ago • 2 comments

Arrow keys don't work for dom-on-keypress.

RobbyDuguay avatar Jan 27 '14 23:01 RobbyDuguay

This is an HTML events thing. If you want arrow keys, you need to detect keyup and/or keydown instead of keypress (just checked; dom-on-keypress does in fact track keypress).

EDIT: Apparently, some browsers register arrows with keypress. No idea which though.

inaimathi avatar Jan 27 '14 23:01 inaimathi

I had literally just looked at that same article when your comment came in.

What I'd like is to get all the goodness of keypress (automatic repetition, for one thing) while also grabbing arrows, delete, etc. It'd be nice to have the modifier keys added to the event as well when it's passed in to Daimio.

I've done something similar to this before -- I'll see if I can track down the old code. If you find a good solution Leo I'd love to use it!

dxnn avatar Jan 27 '14 23:01 dxnn