Packageorg.flixel.system.input
Classpublic class Keyboard
InheritanceKeyboard Inheritance Input Inheritance Object

Keeps track of what keys are pressed and how with handy booleans or strings.



Public Properties
 PropertyDefined By
  A : Boolean
Keyboard
  ALT : Boolean
Keyboard
  B : Boolean
Keyboard
  BACKSLASH : Boolean
Keyboard
  BACKSPACE : Boolean
Keyboard
  C : Boolean
Keyboard
  CAPSLOCK : Boolean
Keyboard
  COMMA : Boolean
Keyboard
  CONTROL : Boolean
Keyboard
  D : Boolean
Keyboard
  DELETE : Boolean
Keyboard
  DOWN : Boolean
Keyboard
  E : Boolean
Keyboard
  EIGHT : Boolean
Keyboard
  END : Boolean
Keyboard
  ENTER : Boolean
Keyboard
  ESCAPE : Boolean
Keyboard
  F : Boolean
Keyboard
  F1 : Boolean
Keyboard
  F10 : Boolean
Keyboard
  F11 : Boolean
Keyboard
  F12 : Boolean
Keyboard
  F2 : Boolean
Keyboard
  F3 : Boolean
Keyboard
  F4 : Boolean
Keyboard
  F5 : Boolean
Keyboard
  F6 : Boolean
Keyboard
  F7 : Boolean
Keyboard
  F8 : Boolean
Keyboard
  F9 : Boolean
Keyboard
  FIVE : Boolean
Keyboard
  FOUR : Boolean
Keyboard
  G : Boolean
Keyboard
  H : Boolean
Keyboard
  HOME : Boolean
Keyboard
  I : Boolean
Keyboard
  INSERT : Boolean
Keyboard
  J : Boolean
Keyboard
  K : Boolean
Keyboard
  L : Boolean
Keyboard
  LBRACKET : Boolean
Keyboard
  LEFT : Boolean
Keyboard
  M : Boolean
Keyboard
  MINUS : Boolean
Keyboard
  N : Boolean
Keyboard
  NINE : Boolean
Keyboard
  NUMPADEIGHT : Boolean
Keyboard
  NUMPADFIVE : Boolean
Keyboard
  NUMPADFOUR : Boolean
Keyboard
  NUMPADMINUS : Boolean
Keyboard
  NUMPADNINE : Boolean
Keyboard
  NUMPADONE : Boolean
Keyboard
  NUMPADPERIOD : Boolean
Keyboard
  NUMPADPLUS : Boolean
Keyboard
  NUMPADSEVEN : Boolean
Keyboard
  NUMPADSIX : Boolean
Keyboard
  NUMPADSLASH : Boolean
Keyboard
  NUMPADTHREE : Boolean
Keyboard
  NUMPADTWO : Boolean
Keyboard
  NUMPADZERO : Boolean
Keyboard
  O : Boolean
Keyboard
  ONE : Boolean
Keyboard
  P : Boolean
Keyboard
  PAGEDOWN : Boolean
Keyboard
  PAGEUP : Boolean
Keyboard
  PERIOD : Boolean
Keyboard
  PLUS : Boolean
Keyboard
  Q : Boolean
Keyboard
  QUOTE : Boolean
Keyboard
  R : Boolean
Keyboard
  RBRACKET : Boolean
Keyboard
  RIGHT : Boolean
Keyboard
  S : Boolean
Keyboard
  SEMICOLON : Boolean
Keyboard
  SEVEN : Boolean
Keyboard
  SHIFT : Boolean
Keyboard
  SIX : Boolean
Keyboard
  SLASH : Boolean
Keyboard
  SPACE : Boolean
Keyboard
  T : Boolean
Keyboard
  TAB : Boolean
Keyboard
  THREE : Boolean
Keyboard
  TWO : Boolean
Keyboard
  U : Boolean
Keyboard
  UP : Boolean
Keyboard
  V : Boolean
Keyboard
  W : Boolean
Keyboard
  X : Boolean
Keyboard
  Y : Boolean
Keyboard
  Z : Boolean
Keyboard
  ZERO : Boolean
Keyboard
Public Methods
 MethodDefined By
  
Keyboard
 Inherited
any():Boolean
Check to see if any keys are pressed right now.
Input
 Inherited
destroy():void
Clean up memory.
Input
 Inherited
getKeyCode(KeyName:String):int
Look up the key code for any given string name of the key or button.
Input
  
handleKeyDown(FlashEvent:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
Keyboard
  
handleKeyUp(FlashEvent:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
Keyboard
 Inherited
justPressed(Key:String):Boolean
Check to see if this key was just pressed.
Input
 Inherited
justReleased(Key:String):Boolean
Check to see if this key is just released.
Input
 Inherited
playback(Record:Array):void
Part of the keystroke recording system.
Input
 Inherited
pressed(Key:String):Boolean
Check to see if this key is pressed.
Input
 Inherited
record():Array
If any keys are not "released" (0), this function will return an array indicating which keys are pressed and what state they are in.
Input
 Inherited
reset():void
Resets all the keys.
Input
 Inherited
update():void
Updates the key states (for tracking just pressed, just released, etc).
Input
Protected Methods
 MethodDefined By
 Inherited
addKey(KeyName:String, KeyCode:uint):void
An internal helper function used to build the key array.
Input
Property Detail
Aproperty
public var A:Boolean

ALTproperty 
public var ALT:Boolean

Bproperty 
public var B:Boolean

BACKSLASHproperty 
public var BACKSLASH:Boolean

BACKSPACEproperty 
public var BACKSPACE:Boolean

Cproperty 
public var C:Boolean

CAPSLOCKproperty 
public var CAPSLOCK:Boolean

COMMAproperty 
public var COMMA:Boolean

CONTROLproperty 
public var CONTROL:Boolean

Dproperty 
public var D:Boolean

DELETEproperty 
public var DELETE:Boolean

DOWNproperty 
public var DOWN:Boolean

Eproperty 
public var E:Boolean

EIGHTproperty 
public var EIGHT:Boolean

ENDproperty 
public var END:Boolean

ENTERproperty 
public var ENTER:Boolean

ESCAPEproperty 
public var ESCAPE:Boolean

Fproperty 
public var F:Boolean

F1property 
public var F1:Boolean

F10property 
public var F10:Boolean

F11property 
public var F11:Boolean

F12property 
public var F12:Boolean

F2property 
public var F2:Boolean

F3property 
public var F3:Boolean

F4property 
public var F4:Boolean

F5property 
public var F5:Boolean

F6property 
public var F6:Boolean

F7property 
public var F7:Boolean

F8property 
public var F8:Boolean

F9property 
public var F9:Boolean

FIVEproperty 
public var FIVE:Boolean

FOURproperty 
public var FOUR:Boolean

Gproperty 
public var G:Boolean

Hproperty 
public var H:Boolean

HOMEproperty 
public var HOME:Boolean

Iproperty 
public var I:Boolean

INSERTproperty 
public var INSERT:Boolean

Jproperty 
public var J:Boolean

Kproperty 
public var K:Boolean

Lproperty 
public var L:Boolean

LBRACKETproperty 
public var LBRACKET:Boolean

LEFTproperty 
public var LEFT:Boolean

Mproperty 
public var M:Boolean

MINUSproperty 
public var MINUS:Boolean

Nproperty 
public var N:Boolean

NINEproperty 
public var NINE:Boolean

NUMPADEIGHTproperty 
public var NUMPADEIGHT:Boolean

NUMPADFIVEproperty 
public var NUMPADFIVE:Boolean

NUMPADFOURproperty 
public var NUMPADFOUR:Boolean

NUMPADMINUSproperty 
public var NUMPADMINUS:Boolean

NUMPADNINEproperty 
public var NUMPADNINE:Boolean

NUMPADONEproperty 
public var NUMPADONE:Boolean

NUMPADPERIODproperty 
public var NUMPADPERIOD:Boolean

NUMPADPLUSproperty 
public var NUMPADPLUS:Boolean

NUMPADSEVENproperty 
public var NUMPADSEVEN:Boolean

NUMPADSIXproperty 
public var NUMPADSIX:Boolean

NUMPADSLASHproperty 
public var NUMPADSLASH:Boolean

NUMPADTHREEproperty 
public var NUMPADTHREE:Boolean

NUMPADTWOproperty 
public var NUMPADTWO:Boolean

NUMPADZEROproperty 
public var NUMPADZERO:Boolean

Oproperty 
public var O:Boolean

ONEproperty 
public var ONE:Boolean

Pproperty 
public var P:Boolean

PAGEDOWNproperty 
public var PAGEDOWN:Boolean

PAGEUPproperty 
public var PAGEUP:Boolean

PERIODproperty 
public var PERIOD:Boolean

PLUSproperty 
public var PLUS:Boolean

Qproperty 
public var Q:Boolean

QUOTEproperty 
public var QUOTE:Boolean

Rproperty 
public var R:Boolean

RBRACKETproperty 
public var RBRACKET:Boolean

RIGHTproperty 
public var RIGHT:Boolean

Sproperty 
public var S:Boolean

SEMICOLONproperty 
public var SEMICOLON:Boolean

SEVENproperty 
public var SEVEN:Boolean

SHIFTproperty 
public var SHIFT:Boolean

SIXproperty 
public var SIX:Boolean

SLASHproperty 
public var SLASH:Boolean

SPACEproperty 
public var SPACE:Boolean

Tproperty 
public var T:Boolean

TABproperty 
public var TAB:Boolean

THREEproperty 
public var THREE:Boolean

TWOproperty 
public var TWO:Boolean

Uproperty 
public var U:Boolean

UPproperty 
public var UP:Boolean

Vproperty 
public var V:Boolean

Wproperty 
public var W:Boolean

Xproperty 
public var X:Boolean

Yproperty 
public var Y:Boolean

Zproperty 
public var Z:Boolean

ZEROproperty 
public var ZERO:Boolean

Constructor Detail
Keyboard()Constructor
public function Keyboard()



Method Detail
handleKeyDown()method
public function handleKeyDown(FlashEvent:KeyboardEvent):void

Event handler so FlxGame can toggle keys.

Parameters

FlashEvent:KeyboardEvent — A KeyboardEvent object.

handleKeyUp()method 
public function handleKeyUp(FlashEvent:KeyboardEvent):void

Event handler so FlxGame can toggle keys.

Parameters

FlashEvent:KeyboardEvent — A KeyboardEvent object.