• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Key Object

Key Object

Method Description Parameters
addListener (whatListener ) Registers a Listener object to the Key object whatListener , an object assigned with an event handler
getAscii() Returns the ASCII value of the last key pressed. 
getCode() Returns the key code of the last key pressed. 
isDown(keycode ) Returns true if the specified key is depressed. keycode , the numerical code assigned to each key
isToggled(keycode ) Returns true if either the Caps Lock or Num Lock key is depressed. keycode , the numerical code for Caps Lock (20) or Num Lock (144)
removeListener (whatListener ) Removes a Listener object whatListener , an object assigned with an event handler
PROPERTY (CONSTANT) DESCRIPTION
BACKSPACE Key code of the Backspace key
CAPSLOCK Key code of the Caps Lock key
CONTROL Key code of the Control key
DELETEKEY Key code of the Delete key
DOWN Key code of the down-arrow key
END Key code of the End key
ENTER Key code of the Enter key
ESCAPE Key code of the Escape key
HOME Key code of the Home key
INSERT Key code of the Insert key
LEFT Key code of the left-arrow key
PGDN Key code of the Page Down key
PGUP Key code of the Page Up key
RIGHT Key code of the right-arrow key
SHIFT Key code of the Shift key
SPACE Key code of the spacebar
TAB Key code of the Tab key
UP Key code of the up-arrow key



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint