Class adf.KeyInputAction
Extends
adf.Action.
Defined in: Action.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Extends adf.Action in order to handle simple user interaction with the keyboard.
|
- Fields borrowed from class adf.Action:
- cursor, graphicsZIndex, name, symbol
Method Attributes | Method Name and Description |
---|---|
activate(element, callBack, continuousCallBack)
This method activates the action and registers the required event listeners to handle key
input events for an HTML DOM element.
|
|
Deactivates the event handlers created in adf.KeyInputAction#activate.
|
- Methods borrowed from class adf.Action:
- reactivate
Class Detail
adf.KeyInputAction()
Extends adf.Action in order to handle simple user interaction with the keyboard.
Registers
a default keyboard listener to the browser's
onkeydown
after the configured element (or
a descendant of) has received an onmousedown
event.
Method Detail
activate(element, callBack, continuousCallBack)
This method activates the action and registers the required event listeners to handle key
input events for an HTML DOM element.
- Parameters:
- {Element} element
- The HTML DOM element where the
onmousedown
event originated. - {Function} callBack
- Callback function is called when the
onkeyup
is fired. The function is called with one parameter, an Integer, representing the key code. See API reference foradf.keys
at dojo.keys. - {Function} continuousCallBack
- Callback function is whenever the
onkeypress
event is fired by the browser. The function is called with one parameter, an Integer, representing the key code. See API reference foradf.keys
at dojo.keys.
deactivate()
Deactivates the event handlers created in adf.KeyInputAction#activate.