qnx.system.ShortcutManager

ShortcutManager

Properties | Methods


Packageqnx.system
Classpublic class ShortcutManager
InheritanceShortcutManager Inheritance flash.events.EventDispatcher

The ShortcutManager class dispatches ShortcutEvent events for platform shortcuts.

Developers can listen to events to allow users to navigate their applications by using the keyboard.



Class information:
BlackBerry 10 Version: 10.1
Found in:  QNXDevice.ane

See also

qnx.events.ShortcutEvent



Public Properties

 PropertyDefined By
  enableShortcuts : Boolean
Enables and disables platform shortcuts.
ShortcutManager
  shortcutManager : ShortcutManager
[static] [read-only] Gets the single instance of the ShortcutManger.
ShortcutManager
  stage : Stage
Gets or sets the stage in which to listen for shortcut events.
ShortcutManager

Public Methods

 MethodDefined By
  
ShortcutManager(enforcer:SingletonEnforcer)
The constructor for this class should not be called directly.
ShortcutManager
  
createShortcutGroup(dispatcher:IEventDispatcher = null):ShortcutGroup
Creates a ShortcutGroup that allows you to register custom shortcut key combinations.
ShortcutManager
  
keyCodeToString(keyCode:int):String
Converts a key code in to a String representation.
ShortcutManager

Property Detail

enableShortcuts


enableShortcuts:Boolean

Enables and disables platform shortcuts.

When set to true platform shortcut key codes are dispatched in KeyboardEvent. This makes it possible to provide a consistent experience on all localized keyboards. For, example, on a QWERTY keyboard, pressing the "t" key will dispatch a key code of Keyboard.HOME. On keyboards that do not have a "t" key, the appropriate key for that keyboard will be used instead.

When set to false, the ShortcutEvent.INCREMENTAL_SEARCH is still dispatched. Listening for this event when set to true will not have the desired effect as some keys will map to platform shortcuts.

The default value is false.


Implementation

public function get enableShortcuts():Boolean
public function set enableShortcuts(value:Boolean):void

shortcutManager


shortcutManager:ShortcutManager  [read-only]

Gets the single instance of the ShortcutManger.


Implementation

public static function get shortcutManager():ShortcutManager

stage


stage:Stage

Gets or sets the stage in which to listen for shortcut events.

By default this is set to the main application stage.


Implementation

public function get stage():Stage
public function set stage(value:Stage):void

Constructor Detail

ShortcutManager()


public function ShortcutManager(enforcer:SingletonEnforcer)

The constructor for this class should not be called directly. Use ShortcutManager.shortcutManager to get a reference to theShortcutManager.

Parameters

enforcer:SingletonEnforcer

See also

shortcutManager

Method Detail

createShortcutGroup()


public function createShortcutGroup(dispatcher:IEventDispatcher = null):ShortcutGroup

Creates a ShortcutGroup that allows you to register custom shortcut key combinations.

Parameters

dispatcher:IEventDispatcher (default = null) — An object on which you wish to listen for keyboard events. If no dispatcher is provided the application's main stage is used. This is useful if you need to create a shortcut group for a control that is in a seperate QNXWindow.

Returns

ShortcutGroup

keyCodeToString()


public function keyCodeToString(keyCode:int):String

Converts a key code in to a String representation. It is similar to the String.fromCharCode method but supports more keys such as ALT, SHIFT, BACKSPACE, etc...

Parameters

keyCode:int — A key code. A complete list can be found in the flash.ui.Keyboard class.

Returns

String — A string representation of the key code.




comments powered by Disqus