class org.aswing.KeyboardManager extends EventDispatcher
Dispatched when key is down. @eventType flash.events.KeyboardEvent.KEY_DOWN
Class Fields
Instance Fields
Show inherited public instance fields | Hide inherited public instance fields
|
function init(root:DisplayObjectContainer): Void
Init the keyboad manager, it will only start works when it is inited.
root | the key trigger root of this keyboard manager. |
function isKeyDown(keyCode:Int): Bool
Returns whether or not the key is down.
the | key code |
returns | true if the specified key is down, false if not. |
function isKeyJustActed(): Bool
Returns whether or not just a key action acted when the last key down.
returns | true if there's key actions acted at last key down, false not. |
function isMnemonicModifierDown(): Bool
Returns whether or not the mnemonic modifier keys is down.
returns | whether or not the mnemonic modifier keys is down. |
function registerKeyAction(key:KeyType, action:Dynamic ->Void): Void
Registers a key action to the default key map of this controller. @see KeyMap#registerKeyAction()
key | the key type |
action | the action |
function setMnemonicModifier(keyCodes:Array<Dynamic>): Void
Sets the mnemonic modifier key codes, the default is [Ctrl, Shift], however for normal UI frameworks, it is [Alt], but because the flashplayer or explorer will eat [Alt] for thier own mnemonic modifier, so we set our default to [Ctrl, Shift].
Sets null to make it allways keep same to getDefaultMnemonicModifier
keyCodes | the array of key codes to be the mnemoic modifier. |
function unregisterKeyAction(key:KeyType): Void
Unregisters a key action to the default key map of this controller. @see KeyMap#unregisterKeyAction()
key | the key type |