|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtgl.input.InputControl
org.jtgl.input.KeyInputControl
public abstract class KeyInputControl
Keyboard InputControl
Field Summary | |
---|---|
static char |
CHAR_NONE
|
static java.lang.String |
CONTROL_CLASSNAME
|
static int |
KEY_DOWN
|
static int |
KEY_ENTER
|
static int |
KEY_LEFT
|
static int |
KEY_MASK_DOWN
|
static int |
KEY_MASK_ENTER
|
static int |
KEY_MASK_LEFT
|
static int |
KEY_MASK_RIGHT
|
static int |
KEY_MASK_UP
|
static int |
KEY_NONE
|
static int |
KEY_NUM0
|
static int |
KEY_NUM1
|
static int |
KEY_NUM2
|
static int |
KEY_NUM3
|
static int |
KEY_NUM4
|
static int |
KEY_NUM5
|
static int |
KEY_NUM6
|
static int |
KEY_NUM7
|
static int |
KEY_NUM8
|
static int |
KEY_NUM9
|
static int |
KEY_RIGHT
|
static int |
KEY_UP
|
protected int |
keyPressed
|
protected int |
keyReleased
|
protected int |
keysPressed
|
protected char |
typedChar
|
Constructor Summary | |
---|---|
KeyInputControl()
Creates a new instance of KeyInputControl |
Method Summary | |
---|---|
int |
getKey()
Gets last single key pressed translated to KeyInputControl.KEY_XXX codes This method is an alias of getKeyPressed() method. |
int |
getKeyPressed()
|
int |
getKeyReleased()
|
int |
getKeys()
Gets multiple keys pressed if supported by implementation as single bits. |
int |
getKeyStates()
Gets pressed keys bitmask status. |
char |
getTypedChar()
|
boolean |
supportsSimultaneusKeys()
|
protected int |
translateKey(int nativeKey)
Translates from native keycode to KeyInputControl.KEY_XXX codes |
void |
updateKeyPressed(int nativeKey)
|
void |
updateKeyReleased(int nativeKey)
|
void |
updateKeyRepeated(int nativeKey)
|
void |
updateKeyTyped(char key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONTROL_CLASSNAME
public static final int KEY_NONE
public static final int KEY_UP
public static final int KEY_DOWN
public static final int KEY_LEFT
public static final int KEY_RIGHT
public static final int KEY_ENTER
public static final int KEY_MASK_UP
public static final int KEY_MASK_DOWN
public static final int KEY_MASK_LEFT
public static final int KEY_MASK_RIGHT
public static final int KEY_MASK_ENTER
public static final int KEY_NUM0
public static final int KEY_NUM1
public static final int KEY_NUM2
public static final int KEY_NUM3
public static final int KEY_NUM4
public static final int KEY_NUM5
public static final int KEY_NUM6
public static final int KEY_NUM7
public static final int KEY_NUM8
public static final int KEY_NUM9
public static final char CHAR_NONE
protected int keyPressed
protected int keyReleased
protected int keysPressed
protected char typedChar
Constructor Detail |
---|
public KeyInputControl()
Method Detail |
---|
public boolean supportsSimultaneusKeys()
public int getKeyPressed()
public int getKeyReleased()
public char getTypedChar()
public int getKey()
getKeyPressed()
method.
getKeyPressed()
public int getKeys()
public int getKeyStates()
public void updateKeyPressed(int nativeKey)
nativeKey
- public void updateKeyReleased(int nativeKey)
nativeKey
- public void updateKeyRepeated(int nativeKey)
nativeKey
- public void updateKeyTyped(char key)
protected int translateKey(int nativeKey)
nativeKey
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |