Package Exports
- akutil-common
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (akutil-common) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
AtlasKit common utilities
A set of common utilities for all AtlasKit components
KeyPressHandler API
Constructor
Adds a new keypress handler
| Param | Type | Description |
|---|---|---|
| key | String | A named key. Case insensitive. |
| callback | function | A callback function to invoke if the given key was activated. |
| [elem] | Node | The element to listen for the key activation. Defaults to document if none given. |
keyPressHandler.add(key, callback)
Adds or replaces a key that is listened for.
Kind: instance method of KeyPressHandler
| Param | Type | Description |
|---|---|---|
| key | String | A named key. Case insensitive. Replaces any previous listened key. |
| callback | function | The callback function to invoke. |
keyPressHandler.destroy([key])
Removes a key from the list of listened keys. Or removes the whole listener if no key given.
Kind: instance method of KeyPressHandler
| Param | Type | Description |
|---|---|---|
| [key] | String | A named key. Case insensitive. If none given, event listener is removed. |