'keyCode' Syntax and Note : keyCode « Javascript Properties « JavaScript Reference

'keyCode' Syntax and Note

Note:

Read-only property. 
Returns the key code pressed. 
Used with the onKeyDown, onKeyUp, and onKeyPress events.

onKeyPress event,        the return value is in Unicode. 
                         This code distinguishes between uppercase and 
                         lowercase characters. 
---------------------------------------------------------------------------
onKeyDown and            the return value code is a character code.
onKeyUp events,          
    
Syntax:
    
window.event.keyCode

    

      
      








Related examples in the same category

1.'keyCode' Example
2.'keyCode' is applied to