ALKMaps.Control.KeyboardDefaults

The KeyboardDefaults control adds panning and zooming functions, controlled with the keyboard.  By default arrow keys pan, +/- keys zoom & Page Up/Page Down/Home/End scroll by three quarters of a page.

This control has no visible appearance.

Inherits from

Summary
ALKMaps.Control.KeyboardDefaultsThe KeyboardDefaults control adds panning and zooming functions, controlled with the keyboard.
Properties
autoActivate{Boolean} Activate the control when it is added to a map.
slideFactorPixels to slide by.
observeElement{DOMelement|String} The DOM element to handle keys for.
Constructor
ALKMaps.Control.KeyboardDefaults
Functions
drawCreate handler.
defaultKeyPressWhen handling the key event, we only use evt.keyCode.

Properties

autoActivate

{Boolean} Activate the control when it is added to a map.  Default is true.

slideFactor

Pixels to slide by.

observeElement

{DOMelement|String} The DOM element to handle keys for.  You can use the map div here, to have the navigation keys work when the map div has the focus.  If undefined the document is used.

Constructor

ALKMaps.Control.KeyboardDefaults

Functions

draw

draw: function()

Create handler.

defaultKeyPress

defaultKeyPress: function (evt)

When handling the key event, we only use evt.keyCode.  This holds some drawbacks, though we get around them below.  When interpreting the keycodes below (including the comments associated with them), consult the URL below.  For instance, the Safari browser returns “IE keycodes”, and so is supported by any keycode labeled “IE”.

Very informative URL

https://unixpapa.com/js/key.html

Parameters

evt{Event}
draw: function()
Create handler.
defaultKeyPress: function (evt)
When handling the key event, we only use evt.keyCode.
Controls affect the display or behavior of the map.
Close