[輔助]KeyCode & ASCII 對應表
|
Keyboard Keys and Key Code ValuesThe following tables list all the keys on a standard keyboard and the corresponding key code values and ASCII key code values that are used to identify the keys in ActionScript: You can use key constants to intercept the built-in behavior of keypresses. For more information on the on() handler, see var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
trace("DOWN -> Code: " + Key.getCode() + "\tACSII: " + Key.getAscii() + "\tKey: " + chr(Key.getAscii()));
};
Key.addListener(keyListener);
For more information on the Key class, see Letters A to Z and standard numbers 0 to 9The following table lists the keys on a standard keyboard for the letters A to Z and the numbers 0 to 9, with the corresponding key code values that are used to identify the keys in ActionScript:
Keys on the numeric keypadThe following table lists the keys on a numeric keypad, with the corresponding key code values that are used to identify the keys in ActionScript:
Function keysThe following table lists the function keys on a standard keyboard, with the corresponding key code values that are used to identify the keys in ActionScript:
Other keysThe following table lists keys on a standard keyboard other than letters, numbers, numeric keypad keys, or function keys, with the corresponding key code values that are used to identify the keys in ActionScript:
For additional key code and ASCII values, use the ActionScript at the beginning of this appendix and press the desired key to trace its key code. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
一共有 0 条评论