The Keyboard class is used to build an interface that can be controlled by a user with a standard keyboard. You can use the methods and properties of the Keyboard class without using a constructor. The properties of the Keyboard class are constants representing the keys that are most commonly used to control games.
Static variables
staticinlineread onlyALTERNATE:Int
Constant associated with the key code value for the Alternate(Option) key (18).
staticinlineread onlyBACKSPACE:Int
Constant associated with the key code value for the Backspace key(8).
staticinlineread onlyCAPS_LOCK:Int
Constant associated with the key code value for the Caps Lock key(20).
staticinlineread onlyCOMMAND:Int
Constant associated with the Mac command key(15). This constant is currently only used for setting menu key equivalents.
staticinlineread onlyCONTROL:Int
Constant associated with the key code value for the Control key(17).
staticinlineread onlyDOWN:Int
Constant associated with the key code value for the Down Arrow key(40).
staticinlineread onlyLEFT:Int
Constant associated with the key code value for the Left Arrow key(37).
staticinlineread onlyNUMPAD:Int
Constant associated with the pseudo-key code for the the number pad(21). Use to set numpad modifier on key equivalents
staticinlineread onlyNUMPAD_0:Int
Constant associated with the key code value for the number 0 key on the number pad(96).
staticinlineread onlyNUMPAD_1:Int
Constant associated with the key code value for the number 1 key on the number pad(97).
staticinlineread onlyNUMPAD_2:Int
Constant associated with the key code value for the number 2 key on the number pad(98).
staticinlineread onlyNUMPAD_3:Int
Constant associated with the key code value for the number 3 key on the number pad(99).
staticinlineread onlyNUMPAD_4:Int
Constant associated with the key code value for the number 4 key on the number pad(100).
staticinlineread onlyNUMPAD_5:Int
Constant associated with the key code value for the number 5 key on the number pad(101).
staticinlineread onlyNUMPAD_6:Int
Constant associated with the key code value for the number 6 key on the number pad(102).
staticinlineread onlyNUMPAD_7:Int
Constant associated with the key code value for the number 7 key on the number pad(103).
staticinlineread onlyNUMPAD_8:Int
Constant associated with the key code value for the number 8 key on the number pad(104).
staticinlineread onlyNUMPAD_9:Int
Constant associated with the key code value for the number 9 key on the number pad(105).
staticinlineread onlyNUMPAD_ADD:Int
Constant associated with the key code value for the addition key on the number pad(107).
staticinlineread onlyNUMPAD_DECIMAL:Int
Constant associated with the key code value for the decimal key on the number pad(110).
staticinlineread onlyNUMPAD_DIVIDE:Int
Constant associated with the key code value for the division key on the number pad(111).
staticinlineread onlyNUMPAD_ENTER:Int
Constant associated with the key code value for the Enter key on the number pad(108).
staticinlineread onlyNUMPAD_MULTIPLY:Int
Constant associated with the key code value for the multiplication key on the number pad(106).
staticinlineread onlyNUMPAD_SUBTRACT:Int
Constant associated with the key code value for the subtraction key on the number pad(109).
staticinlineread onlyPAGE_DOWN:Int
Constant associated with the key code value for the Page Down key(34).
staticinlineread onlyPAGE_UP:Int
Constant associated with the key code value for the Page Up key(33).
staticinlineread onlyRIGHT:Int
Constant associated with the key code value for the Right Arrow key(39).
staticinlineread onlyRIGHTBRACKET:Int
Constant associated with the key code value for the ] key(221).
Static methods
staticisAccessible ():Bool
Specifies whether the last key pressed is accessible by other SWF files. By default, security restrictions prevent code from a SWF file in one domain from accessing a keystroke generated from a SWF file in another domain.
Returns: