Packageorg.openscales.core.handler.keyboard
Classpublic class KeyboardHandler
InheritanceKeyboardHandler Inheritance Handler Inheritance Object

Handler for keyboard

By default handled keys are:



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
Getter and setter of the boolean defining the activity of the handler
Handler
 Inheritedmap : Map
Getter and setter of the map associated to the handler
Handler
  panEastKeyCode : uint
Pan east key code Default is Keyboard.RIGHT
KeyboardHandler
  panNorthKeyCode : uint
Pan north key code Default is Keyboard.UP
KeyboardHandler
  panSouthKeyCode : uint
Pan south key code Default is Keyboard.DOWN
KeyboardHandler
  panStep : Number
Step (in pixels) used to calculate new map position when panning without shift key pressed Default is 75
KeyboardHandler
  panStepShiftkey : Number
Step (in pixels) used to calculate new map position when panning with shift key pressed Default is 225
KeyboardHandler
  panWestKeyCode : uint
Pan west key code Default is Keyboard.LEFT
KeyboardHandler
 InheritedtoggleHandlerActivity : Function
Getter and setter of the callback function used when the handler's activity changes
Handler
  zoomInKeyCode : uint
Zoom in key code Default is plus sign (on numerical pad) code
KeyboardHandler
  zoomOutKeyCode : uint
Zoom out key code Default is minus sign (on numerical pad) code
KeyboardHandler
Public Methods
 MethodDefined By
  
KeyboardHandler(target:Map = null, active:Boolean = true)
Constructor
KeyboardHandler
  
This method sets commands to defaults
KeyboardHandler
Protected Methods
 MethodDefined By
  
[override] Add the listeners to the associated map
KeyboardHandler
  
[override] Remove the listeners to the associated map
KeyboardHandler
Property Detail
panEastKeyCodeproperty
panEastKeyCode:uint

Pan east key code

Default is Keyboard.RIGHT


Implementation
    public function get panEastKeyCode():uint
    public function set panEastKeyCode(value:uint):void
panNorthKeyCodeproperty 
panNorthKeyCode:uint

Pan north key code

Default is Keyboard.UP


Implementation
    public function get panNorthKeyCode():uint
    public function set panNorthKeyCode(value:uint):void
panSouthKeyCodeproperty 
panSouthKeyCode:uint

Pan south key code

Default is Keyboard.DOWN


Implementation
    public function get panSouthKeyCode():uint
    public function set panSouthKeyCode(value:uint):void
panStepproperty 
panStep:Number

Step (in pixels) used to calculate new map position when panning without shift key pressed

Default is 75


Implementation
    public function get panStep():Number
    public function set panStep(value:Number):void
panStepShiftkeyproperty 
panStepShiftkey:Number

Step (in pixels) used to calculate new map position when panning with shift key pressed

Default is 225


Implementation
    public function get panStepShiftkey():Number
    public function set panStepShiftkey(value:Number):void
panWestKeyCodeproperty 
panWestKeyCode:uint

Pan west key code

Default is Keyboard.LEFT


Implementation
    public function get panWestKeyCode():uint
    public function set panWestKeyCode(value:uint):void
zoomInKeyCodeproperty 
zoomInKeyCode:uint

Zoom in key code

Default is plus sign (on numerical pad) code


Implementation
    public function get zoomInKeyCode():uint
    public function set zoomInKeyCode(value:uint):void
zoomOutKeyCodeproperty 
zoomOutKeyCode:uint

Zoom out key code

Default is minus sign (on numerical pad) code


Implementation
    public function get zoomOutKeyCode():uint
    public function set zoomOutKeyCode(value:uint):void
Constructor Detail
KeyboardHandler()Constructor
public function KeyboardHandler(target:Map = null, active:Boolean = true)

Constructor

Parameters
target:Map (default = null) — The Map that will be concerned by event handling
 
active:Boolean (default = true) — Boolean defining if the handler is active or not (default=true)
Method Detail
registerListeners()method
override protected function registerListeners():void

Add the listeners to the associated map

setKeyCodesToDefault()method 
public function setKeyCodesToDefault():void

This method sets commands to defaults

unregisterListeners()method 
override protected function unregisterListeners():void

Remove the listeners to the associated map