1. Key Codes
This document is written by Helge Willum Larsen
It contains a list of all "onkeypress", "onkeydown" and "onkeyup" KeyCodes in
JavaScript,
that can be typed with a DANISH KEYBOARD !!!
Other keyboards probably have other KeyCodes.
The first section is tested with the Microsoft Internet Explore 5.0 and the
Netscape
Communicator 4.51. At this time, Netscape didn't support "onkeydown" and
"onkeyup".
I strongly recommend that you use the "onkeypress" function.
It has the greatest browser-compatibility.
Otherwise, you can maybe use some of the codes in the bottom of the page:
_____________________________________________________________________
2. _______________________
KeyCodes (ALL keyboards): onkeypress Tested with
Internet Explore 5.0
By: Helge Willum Larsen and Netscape
Communicator 4.51
on a DANISH
keyboard
_____________________________________________________________________
_______________________
SUPPORTS MULTIPLE KEYPRESSES:
[A] = [a]
[Shift] + [A] = [A]
[CapsLock] + [A] = [A]
[Shift] + [CapsLock] + [A] = [a]
ALL KEYS THAT CREATES THE SAME OUTPUT, HAVE THE SAME
KEYCODES !
3. [NumPad 1] is the same as [1] (if NumLock)
[NumPad +] is the same as [+]
DOES NOT SUPPORT ARROW-KEYS, DELETE, INSERT, SHIFT, ALT,
CTRL, TAB, ESC...........!
But it supports [Return / Enter] and [Backspace]
_____________________________________________________________________
_______________________
Button: keyCode:
[BackSpace] 8
[Return / Enter] 13
[!] 33
["] 34
11. ALL KEYS HAVE THEIR OWN, INDIVIDUAL KEYCODE !
[NumPad 1] is NOT the same as [1]
[NumPad +] is NOT the same as [+]
_____________________________________________________________________
_______________________
Button: keyCode: NumLock: CapsLock:
ScrollLock:
[BackSpace] 8 - -
-
[Tab] 9 - -
-
[NumPad 5] 12 no -
-
[Return / Enter] 13 - - -