Class: atkKeyboard
Source Location: /keyboard/class.atkkeyboard.inc
Class atkKeyboard
Property Summary
| mixed |
$m_dummy |
WORKAROUND: in php (4.3.1 at least) at least one member var must exist, to make it possible to create singletons. |
Method Summary
| void |
addFormElementHandler() |
Make a form element keyboard aware. Once added with this function, the element will automatically respond to cursor key navigation. |
| void |
addHandler() |
Register a generic keyboard handler. This method is used internally by other atkKeyboard members, but can also be used to add a custom keyboard handler to the page. |
| void |
addRecordListHandler() |
Make a recordlist keyboard aware. Once added with this function, the recordlist will automatically respond to keyboard navigation events. |
Properties
WORKAROUND: in php (4.3.1 at least) at least one member var must exist, to make it possible to create singletons.
API Tags:
Methods
void addFormElementHandler(
String
$id, int
$navkeys
)
|
|
Make a form element keyboard aware. Once added with this function, the element will automatically respond to cursor key navigation.
Parameters:
|
String |
$id: |
The HTML id of the form element for which keyboard navigation is added. |
|
int |
$navkeys: |
A bitwise mask indicating which keys should be supported for this element. Some elements, like for example textarea's, use some cursor movements for their own navigation. In this case, pass a mask that uses different keys. |
void addHandler(
String
$handlertype, array
$params
)
|
|
Register a generic keyboard handler. This method is used internally by other atkKeyboard members, but can also be used to add a custom keyboard handler to the page.
Parameters:
|
String |
$handlertype: |
The name of the javascript class used for keyboard traps. |
|
array |
$params: |
Any param you may want to pass to the handler. The params you need to pass depend completely on the handler used. See the handlers' documentation on params needed. |
void addRecordListHandler(
String
$id, String
$highlight, String
$reccount
)
|
|
Make a recordlist keyboard aware. Once added with this function, the recordlist will automatically respond to keyboard navigation events.
Parameters:
|
String |
$id: |
The unique id of the recordlist. |
|
String |
$highlight: |
The color used to highlight rows that are selected with cursorkeys. |
|
String |
$reccount: |
The number of records in the list. The handler needs this to be able to determine when it's at the end of the list, so it can wrap around when the cursor is moved beyond the end. |
Get the one and only (singleton) instance of the atkKeyboard class.
API Tags:
| Return: | The singleton instance. |