| Package | org.aswing |
| Class | public class KeyMap |
See also
| Method | Defined by | ||
|---|---|---|---|
|
KeyMap()
Creates a key map.
| KeyMap | ||
|
containsKey(key:KeyType):Boolean
Returns whether the key definition is already registered.
| KeyMap | ||
|
fireKeyAction(keySequence:Array):Boolean
Fires a key action with key sequence.
| KeyMap | ||
|
[static]
Returns the codec of a key definition, same codec means same key definitions.
| KeyMap | ||
|
getCodecWithKeySequence(keySequence:Array):String
[static]
Returns the codec of a key sequence.
| KeyMap | ||
|
getKeyAction(key:KeyType):Function
Returns the action from the key defintion.
| KeyMap | ||
|
registerKeyAction(key:KeyType, action:Function):void
Registers a key definition -> action pair to the map.
| KeyMap | ||
|
unregisterKeyAction(key:KeyType):void
Unregisters a key and its action value.
| KeyMap | ||
| KeyMap | () | constructor |
public function KeyMap()Creates a key map.
| containsKey | () | method |
public function containsKey(key:KeyType):BooleanReturns whether the key definition is already registered.
Parameterskey:KeyType — the key definition
|
Boolean |
| fireKeyAction | () | method |
public function fireKeyAction(keySequence:Array):BooleanFires a key action with key sequence.
ParameterskeySequence:Array |
Boolean — whether or not a key action fired with this key sequence.
|
| getCodec | () | method |
public static function getCodec(key:KeyType):StringReturns the codec of a key definition, same codec means same key definitions.
Parameterskey:KeyType — the key definition
|
String — the codec of specified key definition
|
| getCodecWithKeySequence | () | method |
public static function getCodecWithKeySequence(keySequence:Array):StringReturns the codec of a key sequence.
ParameterskeySequence:Array — the key sequence
|
String — the codec of specified key sequence
|
| getKeyAction | () | method |
public function getKeyAction(key:KeyType):FunctionReturns the action from the key defintion.
Parameterskey:KeyType — the key definition
|
Function — the action.
|
See also
| registerKeyAction | () | method |
public function registerKeyAction(key:KeyType, action:Function):voidRegisters 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.
Parameterskey:KeyType — the key definition.
|
|
action:Function — the aciton function
|
| unregisterKeyAction | () | method |
public function unregisterKeyAction(key:KeyType):voidUnregisters a key and its action value.
Parameterskey:KeyType — the key and its value to be unrigesterd.
|