Class Index | File Index

Classes


Class gui.KeyboardHandler


Defined in: KeyboardHandler.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
gui.KeyboardHandler.KeyCode
<static>  
gui.KeyboardHandler.Modifier
Method Summary
Method Attributes Method Name and Description
 
bind(keyCode, modifiers, callback, overwrite)
Bind to the specified keycode + modifiers.
<inner>  
getKeyCombo(keyCode, modifiers)
<inner>  
 
 
setDefault(callback)
 
unbind(keyCode, modifiers)
Class Detail
gui.KeyboardHandler()
Returns:
{?}
Field Detail
<static> gui.KeyboardHandler.KeyCode

<static> gui.KeyboardHandler.Modifier
Method Detail
bind(keyCode, modifiers, callback, overwrite)
Bind to the specified keycode + modifiers. To bind directly to one of the modifiers, simply pass in the modifier as the keyCode (e.g., Keycode.Ctrl), and set the modifiers to Modifier.None. This class will take care of binding to the appropriate modifiers to ensure the keybinding works as expected.
Parameters:
{!number} keyCode
{!number} modifiers
{!Function} callback
{boolean=} overwrite
Set to true to force a binding to be overwritten

<inner> {!string} getKeyCombo(keyCode, modifiers)
Parameters:
{!number} keyCode
{!number} modifiers
Returns:
{!string}

<inner> {!number} getModifiers(e)
Parameters:
{!KeyboardEvent} e
Returns:
{!number}

handleEvent(e)
Parameters:
{!KeyboardEvent} e

setDefault(callback)
Parameters:
{?Function} callback

unbind(keyCode, modifiers)
Parameters:
{!number} keyCode
{!number} modifiers

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Aug 06 2015 04:10:40 GMT+0200 (MESZ)