KeyboardManager
Keyboard manager
Constructors
new KeyboardManager()
new KeyboardManager(
app
):KeyboardManager
Parameters
• app: Application
<any
>
Returns
Source
src/input/KeyboardManager.ts:86
Accessors
debug
set
debug(pEnabled
):void
Parameters
• pEnabled: boolean
Source
src/input/KeyboardManager.ts:139
isActive
get
isActive():boolean
Returns
boolean
Source
src/input/KeyboardManager.ts:143
numLayers
get
numLayers():number
Returns
number
Source
src/input/KeyboardManager.ts:147
Methods
addDefaultBindings()
addDefaultBindings():
void
Returns
void
Source
src/input/KeyboardManager.ts:274
addKeyBinding()
addKeyBinding(
pDirection
,pKeyCode
,pModifiers
?):void
Parameters
• pDirection: "Enter"
| Direction
• pKeyCode: KeyCodes
• pModifiers?: Partial
<object
>
Returns
void
Source
src/input/KeyboardManager.ts:151
getAllKeyBindings()
getAllKeyBindings():
Readonly
<object
>
Returns
Readonly
<object
>
Source
src/input/KeyboardManager.ts:254
getKeyBindings()
getKeyBindings(
pDirection
):IKeyboardBinding
[]
Parameters
• pDirection: "Enter"
| Direction
Returns
IKeyboardBinding
[]
Source
src/input/KeyboardManager.ts:250
isKeyBound()
isKeyBound(
pKeyCode
,pModifiers
?):false
|object
returns an object which you can use for removeBinding, or false if not bound
Parameters
• pKeyCode: KeyCodes
• pModifiers?: Partial
<object
>
Returns
false
| object
Source
src/input/KeyboardManager.ts:295
isKeyDown()
isKeyDown(…
args
):boolean
Parameters
• …args: (string
| KeyCodes
)[]
Returns
boolean
Source
src/input/KeyboardManager.ts:319
printAllKeyBindings()
printAllKeyBindings():
void
log key bindings to console, if this.debug is true
Returns
void
Source
src/input/KeyboardManager.ts:266
removeAllKeyBindings()
removeAllKeyBindings():
void
Returns
void
Source
src/input/KeyboardManager.ts:245
removeKeyBinding()
removeKeyBinding(
pDirection
,pKeyCode
,pModifiers
?):void
removes a specific key associated with the direction
Parameters
• pDirection: "Enter"
| Direction
• pKeyCode: KeyCodes
• pModifiers?: Partial
<object
>
Returns
void
Source
src/input/KeyboardManager.ts:199
removeKeyBindings()
removeKeyBindings(
pDirection
):void
removes all keys associated with the direction
Parameters
• pDirection: "Enter"
| Direction
Returns
void
Source
src/input/KeyboardManager.ts:193
bindingToString()
static
bindingToString(pBinding
):string
Parameters
• pBinding: IKeyboardBinding
Returns
string