dxnn / daimio

A framework for building programmable applications

Home Page:daimio.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dom-on-keypress Arrow Keys

RobbyDuguay opened this issue · comments

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

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.

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!