# javascript: onkeypress in IE



## nj2b (Sep 9, 2006)

I'm working on a game where I'm using arrow, insert, delete, and page up/down keys under the onkeyup event handler, and so far, it works fine in all browsers that I've been able to test with; however, in part of the game, I want to be able to take advantage of key repetition using onkeypress since a user wouldn't have to repeatedly press a key. 

I know the onkeypress event for the aforementioned keys does not work in IE and apparently Safari, but is there way to perhaps cancel the keyup event to simulate the repetition? Should I sacrifice convenience for portability? I can use alpha keys, but it seems more intuitive to use the arrow keys.

Any ideas?
TIA


----------

