TOC PREV NEXT INDEX

domref



keyCode


Returns a number representing the character that was pressed as part of the key event.

Syntax

character = event.keyCode
 

Parameters

character is a number representing the key that was pressed for the event.

Example

if e.keyCode == 0
 
   // mouseEvent!
 

Notes

Mouse events generate a keyCode of 0. For a list of the keyCode values associated with particular keys, run the example in Example 7: Displaying Event Object Constants and view the resulting HTML table.

Specification

Not part of specification.
 
See nsIDOMKeyEvent.IDL
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX