class org.aswing.KeyMap
KeyMap is a key definition -> action map. @see org.aswing.KeyDefinition @author paling
Class Fields
static function getCodec(key:KeyType): String
Returns the codec of a key definition, same codec means same key definitions.
key | the key definition |
returns | the codec of specified key definition |
static function getCodecWithKeySequence(keySequence:Array<Dynamic>): String
Returns the codec of a key sequence.
keySequence | the key sequence |
returns | the codec of specified key sequence |
Instance Fields
function containsKey(key:KeyType): Bool
Returns whether the key definition is already registered.
key | the key definition |
function fireKeyAction(keySequence:Array<Dynamic>): Bool
Fires a key action with key sequence.
returns | whether or not a key action fired with this key sequence. |
function getKeyAction(key:KeyType): Dynamic
Returns the action from the key defintion. @see #getCodec()
key | the key definition |
returns | the action. |
function registerKeyAction(key:KeyType, action:Dynamic): Void
Registers a key definition -> action pair to the map. If same key definition is already in the map, it will be replaced with the new one.
key | the key definition. |
action | the aciton function |
function unregisterKeyAction(key:KeyType): Void
Unregisters a key and its action value.
key | the key and its value to be unrigesterd. |