gma.keyHandler¶
Provides key event handling
Package
gma/events
Already Instantiated
Properties¶
handlers
Provides a dictionary of keycode : arrayThe array holds functions which are called when the corresponding keycode is triggered
Type
Dictionary
Methods¶
- keyCheck (e)
Determines what functions should be called when a keypress event is triggered
Parameters
e
Event
The event that has been triggered
- register (keyCode, func)
Allows you to register a function to a keyCode
Parameters
keyCode
Number or Character
The keycode that triggers this function
func
Function
Function to call when we have this event
- numEvents (keyCode)
- Tells you how many functions you have registered for provided keyCodeIf no keycode is given, then it tells you total functions you have registered
Parameters
keyCode
Number or Character
The keycode you want to inspect
- reset ( )
Unregisters everything