Cross-browser unified key codes?

  • Thread starter Rancid Buttchutney
  • Start date
R

Rancid Buttchutney

I've noticed that Opera (version 9) returns a value of
35 for both the hash and END key codes in response
to keyup, keydown and keypress events. IE, Firefox
and Netscape, on the other hand, differentiate between
the two. Is there a way to normalize Opera's behavior
and determine which of the hash or END keys were
pressed?
 
M

Matt Kruse

Rancid said:
I've noticed that Opera (version 9) returns a value of
35 for both the hash and END key codes in response
to keyup, keydown and keypress events. IE, Firefox
and Netscape, on the other hand, differentiate between
the two. Is there a way to normalize Opera's behavior
and determine which of the hash or END keys were
pressed?

Keyboard events are horribly non-standard and confusing.

I've asked the question before, but got no response - is there a recommended
library which handles keyboard events and handles all the differences
between browsers? So I can just say "register an event when ESC is pressed"
and not worry about which browsers pass which keycodes for which events. So
far, I've not found such a generalized lib. I've started writing my own, but
haven't had the time to dedicate to making it robust.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,531
Members
45,004
Latest member
KetoBoostGummies

Latest Threads

Top