This project is archived and is in readonly mode.

#210 ✓invalid
cfenzo

event.code gives uppercase letter code

Reported by cfenzo | July 9th, 2008 @ 09:27 AM | in 2.0 (closed)

When tracking key events, event.code gives the code for the uppercase letter, no matter what.

Firebug says that the "event" sendt through the Event() initialize() function also has the keyCode and/or charCode for the uppercase letter.

testcase: http://cfm.no/dev/moo/capslock/c...

Try typing in "eE".

Comments and changes to this ticket

  • Yuffster

    Yuffster July 19th, 2008 @ 05:53 PM

    • State changed from “new” to “invalid”

    event.code represents the event key code. E and e are the same key, hence the same key code. See event.charCode for the character code.

  • cfenzo

    cfenzo July 20th, 2008 @ 05:45 PM

    For the letter "e" (charcode "101")

    code:69

    event.charCode:0

    event.keyCode:69

    event.which:69

    All variables available from mootools gives the charCode for the uppercase letter (in this case "E", charcode "69").

  • kilianc

    kilianc April 25th, 2011 @ 11:58 PM

    • Milestone order changed from “0” to “0”

    e.charCode is 0 for all keys on my mac... :(

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Tags

Pages