ALKMaps.Handler.Keyboard

A handler for keyboard events.  Create a new instance with the ALKMaps.Handler.Keyboard constructor.

Inherits from

Summary
ALKMaps.Handler.KeyboardA handler for keyboard events.
Constants
KEY_EVENTSkeydown, keypress, keyup
Properties
eventListener{Function}
observeElement{DOMElement|String} The DOM element on which we listen for key events.
Constructor
ALKMaps.Handler.KeyboardReturns a new keyboard handler.
Functions
destroy
activate
deactivate
handleKeyEvent

Constants

KEY_EVENTS

keydown, keypress, keyup

Properties

eventListener

{Function}

observeElement

{DOMElement|String} The DOM element on which we listen for key events.  Default to the document.

Constructor

ALKMaps.Handler.Keyboard

Returns a new keyboard handler.

Parameters

control{ALKMaps.Control} The control that is making use of this handler.  If a handler is being used without a control, the handlers setMap method must be overridden to deal properly with the map.
callbacks{Object} An object containing a single function to be called when the drag operation is finished.  The callback should expect to receive a single argument, the pixel location of the event.  Callbacks for ‘keydown’, ‘keypress’, and ‘keyup’ are supported.
options{Object} Optional object whose properties will be set on the handler.

Functions

destroy

destroy: function()

activate

activate: function()

deactivate

deactivate: function()

handleKeyEvent

handleKeyEvent: function (evt)
destroy: function()
activate: function()
deactivate: function()
handleKeyEvent: function (evt)
Returns a new keyboard handler.
Base class to construct a higher-level handler for event sequences.
Controls affect the display or behavior of the map.
Close