Packageorg.flixel.data
Classpublic class FlxKeyboard
InheritanceFlxKeyboard Inheritance Object



Public Properties
 PropertyDefined By
  A : Boolean
FlxKeyboard
  ALT : Boolean
FlxKeyboard
  B : Boolean
FlxKeyboard
  BACKSLASH : Boolean
FlxKeyboard
  BACKSPACE : Boolean
FlxKeyboard
  C : Boolean
FlxKeyboard
  CAPSLOCK : Boolean
FlxKeyboard
  COMMA : Boolean
FlxKeyboard
  CONTROL : Boolean
FlxKeyboard
  D : Boolean
FlxKeyboard
  DELETE : Boolean
FlxKeyboard
  DOWN : Boolean
FlxKeyboard
  E : Boolean
FlxKeyboard
  EIGHT : Boolean
FlxKeyboard
  ENTER : Boolean
FlxKeyboard
  ESCAPE : Boolean
FlxKeyboard
  F : Boolean
FlxKeyboard
  F1 : Boolean
FlxKeyboard
  F10 : Boolean
FlxKeyboard
  F11 : Boolean
FlxKeyboard
  F12 : Boolean
FlxKeyboard
  F2 : Boolean
FlxKeyboard
  F3 : Boolean
FlxKeyboard
  F4 : Boolean
FlxKeyboard
  F5 : Boolean
FlxKeyboard
  F6 : Boolean
FlxKeyboard
  F7 : Boolean
FlxKeyboard
  F8 : Boolean
FlxKeyboard
  F9 : Boolean
FlxKeyboard
  FIVE : Boolean
FlxKeyboard
  FOUR : Boolean
FlxKeyboard
  G : Boolean
FlxKeyboard
  H : Boolean
FlxKeyboard
  I : Boolean
FlxKeyboard
  J : Boolean
FlxKeyboard
  K : Boolean
FlxKeyboard
  L : Boolean
FlxKeyboard
  LBRACKET : Boolean
FlxKeyboard
  LEFT : Boolean
FlxKeyboard
  M : Boolean
FlxKeyboard
  MINUS : Boolean
FlxKeyboard
  N : Boolean
FlxKeyboard
  NINE : Boolean
FlxKeyboard
  NUMPADEIGHT : Boolean
FlxKeyboard
  NUMPADFIVE : Boolean
FlxKeyboard
  NUMPADFOUR : Boolean
FlxKeyboard
  NUMPADMINUS : Boolean
FlxKeyboard
  NUMPADNINE : Boolean
FlxKeyboard
  NUMPADONE : Boolean
FlxKeyboard
  NUMPADPERIOD : Boolean
FlxKeyboard
  NUMPADPLUS : Boolean
FlxKeyboard
  NUMPADSEVEN : Boolean
FlxKeyboard
  NUMPADSIX : Boolean
FlxKeyboard
  NUMPADSLASH : Boolean
FlxKeyboard
  NUMPADTHREE : Boolean
FlxKeyboard
  NUMPADTWO : Boolean
FlxKeyboard
  NUMPADZERO : Boolean
FlxKeyboard
  O : Boolean
FlxKeyboard
  ONE : Boolean
FlxKeyboard
  P : Boolean
FlxKeyboard
  PERIOD : Boolean
FlxKeyboard
  PLUS : Boolean
FlxKeyboard
  Q : Boolean
FlxKeyboard
  QUOTE : Boolean
FlxKeyboard
  R : Boolean
FlxKeyboard
  RBRACKET : Boolean
FlxKeyboard
  RIGHT : Boolean
FlxKeyboard
  S : Boolean
FlxKeyboard
  SEMICOLON : Boolean
FlxKeyboard
  SEVEN : Boolean
FlxKeyboard
  SHIFT : Boolean
FlxKeyboard
  SIX : Boolean
FlxKeyboard
  SLASH : Boolean
FlxKeyboard
  SPACE : Boolean
FlxKeyboard
  T : Boolean
FlxKeyboard
  THREE : Boolean
FlxKeyboard
  TWO : Boolean
FlxKeyboard
  U : Boolean
FlxKeyboard
  UP : Boolean
FlxKeyboard
  V : Boolean
FlxKeyboard
  W : Boolean
FlxKeyboard
  X : Boolean
FlxKeyboard
  Y : Boolean
FlxKeyboard
  Z : Boolean
FlxKeyboard
  ZERO : Boolean
FlxKeyboard
Public Methods
 MethodDefined By
  
Constructor
FlxKeyboard
  
handleKeyDown(event:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
FlxKeyboard
  
handleKeyUp(event:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
FlxKeyboard
  
justPressed(Key:String):Boolean
Check to see if this key was just pressed.
FlxKeyboard
  
justReleased(Key:String):Boolean
Check to see if this key is just released.
FlxKeyboard
  
pressed(Key:String):Boolean
Check to see if this key is pressed.
FlxKeyboard
  
reset():void
Resets all the keys.
FlxKeyboard
  
update():void
Updates the key states (for tracking just pressed, just released, etc).
FlxKeyboard
Protected Methods
 MethodDefined By
  
addKey(KeyName:String, KeyCode:uint):void
An internal helper function used to build the key array.
FlxKeyboard
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

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

Iproperty 
public var I: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

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

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
FlxKeyboard()Constructor
public function FlxKeyboard()

Constructor

Method Detail
addKey()method
protected function addKey(KeyName:String, KeyCode:uint):void

An internal helper function used to build the key array.

Parameters

KeyName:String — String name of the key (e.g. "LEFT" or "A")
 
KeyCode:uint — The numeric Flash code for this key.

handleKeyDown()method 
public function handleKeyDown(event:KeyboardEvent):void

Event handler so FlxGame can toggle keys.

Parameters

event:KeyboardEvent — A KeyboardEvent object.

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

Event handler so FlxGame can toggle keys.

Parameters

event:KeyboardEvent — A KeyboardEvent object.

justPressed()method 
public function justPressed(Key:String):Boolean

Check to see if this key was just pressed.

Parameters

Key:String — One of the key constants listed above (e.g. "LEFT" or "A").

Returns
Boolean — Whether the key was just pressed
justReleased()method 
public function justReleased(Key:String):Boolean

Check to see if this key is just released.

Parameters

Key:String — One of the key constants listed above (e.g. "LEFT" or "A").

Returns
Boolean — Whether the key is just released.
pressed()method 
public function pressed(Key:String):Boolean

Check to see if this key is pressed.

Parameters

Key:String — One of the key constants listed above (e.g. "LEFT" or "A").

Returns
Boolean — Whether the key is pressed
reset()method 
public function reset():void

Resets all the keys.

update()method 
public function update():void

Updates the key states (for tracking just pressed, just released, etc).