Controls the keyboard keys. This module uses jQuery.hotkeys plugin. If desired it can be replaced with any other keyboard interface code without affecting the keyboard consumer modules.
(require("keyboard-controller"))(viewer)
Creates the keyboard controller module.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
Core |
The core viewer to which the module will attach. |
Fires:
Listens to Events:
-
module:event-store#event:RegisterKeyCombinations for "KeyCombinations" state
Example
var KeyboardController = require('keyboard-controller.js');
// a generic Viewer constructor
function Viewer(opts) {
var myKeyboardController = KeyboardController(this);
}
Fires:
Listens to Events:
-
module:event-store#event:RegisterKeyCombinations for "KeyCombinations" state
Example
var KeyboardController = require('keyboard-controller.js');
// a generic Viewer constructor
function Viewer(opts) {
var myKeyboardController = KeyboardController(this);
}
(require("keyboard-controller"))(viewer)
Creates the keyboard controller module.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
Core |
The core viewer to which the module will attach. |
Fires:
Listens to Events:
-
module:event-store#event:RegisterKeyCombinations for "KeyCombinations" state
Example
var KeyboardController = require('keyboard-controller.js');
// a generic Viewer constructor
function Viewer(opts) {
var myKeyboardController = KeyboardController(this);
}
(require("keyboard-controller"))(viewer)
Creates the keyboard controller module.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
Core |
The core viewer to which the module will attach. |
Methods
destroy()
Destroys the module.
destroy()
Destroys the module.
destroy()
Destroys the module.