| Thread Previous • Date Previous • Date Next • Thread Next |
Hi team!
If you don't mind having both keypress and keydown event handling then we're OK. Otherwise, we (I?) may need a bit more time. Hope this doesn't feel too much like a "hack".
I have had a quick look at the problem. Since I suppose we can only get ASCII codes from keypress, I don't see any way around using both. I played with some code that I'll attach to this mail. It seems that we should be able to only use keypress, if the key has not been processed by keydown. So my idea at the moment would be a modification of Egor's code. Analyse the key code in keydown and see if it is a non-character key and if not, let keypress do its thing. In the attached file the arrow keys are handled in keydown, while all other keys are handled in keypress. Just to illustrate the idea. The code in the file has been tested on OSX in Safari, FF and Opera.
Another idea would be to figure out the ASCII from the key code and only use keydown. Well, tomorrow maybe :-)
Cheers, Hannes
| Thread Previous • Date Previous • Date Next • Thread Next |