Extends
Constructor
new ve.ce.KeyDownHandlerFactory()
#
Hierarchy
Key down handler factory.
Key down handler factory.
Methods
executeHandlersForKey(key, selectionName, surface, e) → {boolean}
#
Execute the handlers for a specific key
Parameters:
Name | Type | Description |
---|---|---|
key |
number | Key code |
selectionName |
string | Selection type name |
surface |
ve.ce.Surface | |
e |
jQuery.Event | Key down event |
Returns:
Some handlers acted
- Type
- boolean
Execute the handlers for a specific key
lookupHandlersForKey(key, selectionName) → {Array.<function()>}
#
Get the handler for a specific key
Parameters:
Name | Type | Description |
---|---|---|
key |
number | Key code |
selectionName |
string | Selection type name |
Returns:
Matched handlers
- Type
- Array.<function()>
Get the handler for a specific key
register(constructor)
#
Register a constructor with the factory.
function MyClass() {};
OO.initClass( MyClass );
MyClass.static.name = 'hello';
// Register class with the factory, available via the symbolic name "hello"
factory.register( MyClass );
Parameters:
Name | Type | Description |
---|---|---|
constructor |
function | Constructor to use when creating object |
Throws:
-
If a parameter is invalid
- Type
- Error
Register a constructor with the factory.