Object | +-ExtendedKey public class ExtendedKey extends Object
Provides extended key codes that can be returned from the Key.getCode() method.
The following example creates a listener that is called when a key is pressed. It uses the Key.getCode() method to get the key code for the key that was pressed:
var myListener = new Object();
myListener.onKeyDown = function() {
var code = Key.getCode();
switch(code) {
case 50:
trace("number 2 down");
break;
case Key.ENTER:
trace("enter down");
break;
case ExtendedKey.SOFT1:
trace("soft1 down");
break;
default:
trace(code + " down");
break;
}
}
myListener.onKeyUp = function() {
text2 = "onKeyUp called";
}
Key.addListener(myListener);
|
Modifiers |
Property |
Description |
|---|---|---|
|
static |
The key code value for the SOFT1 soft key. |
|
|
static |
The key code value for the SOFT10 soft key. |
|
|
static |
The key code value for the SOFT11 soft key. |
|
|
static |
The key code value for the SOFT12 soft key. |
|
|
static |
The key code value for the SOFT2 soft key. |
|
|
static |
The key code value for the SOFT3 soft key. |
|
|
static |
The key code value for the SOFT4 soft key. |
|
|
static |
The key code value for the SOFT5 soft key. |
|
|
static |
The key code value for the SOFT6 soft key. |
|
|
static |
The key code value for the SOFT7 soft key. |
|
|
static |
The key code value for the SOFT8 soft key. |
|
|
static |
The key code value for the SOFT9 soft key. |
Properties inherited from class Object
|
constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property) |
Methods inherited from class Object