|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Keyboard
Represents the keyboard input. Gives informations such as pressed key and code.
Field Summary | |
---|---|
static int |
ALT
ALT key. |
static int |
CONTROL
CTRL key. |
static int |
DOWN
Arrow down key. |
static int |
ESCAPE
Escape key. |
static int |
LEFT
Arrown left key. |
static int |
RIGHT
Arrown right key. |
static int |
SPACE
Space key. |
static int |
TAB
Tab key. |
static int |
UP
Arrow up key. |
Method Summary | |
---|---|
int |
getKeyCode()
Get the current pressed key code. |
char |
getKeyName()
Get the current pressed key name. |
boolean |
isPressed(int key)
Check if the key is currently pressed. |
boolean |
isPressedOnce(int key)
Check if the key is currently pressed (not continuously). |
boolean |
used()
Check if the keyboard is currently used (at least one pressed key). |
Field Detail |
---|
static final int UP
static final int DOWN
static final int RIGHT
static final int LEFT
static final int CONTROL
static final int ALT
static final int ESCAPE
static final int SPACE
static final int TAB
Method Detail |
---|
boolean isPressed(int key)
key
- key to check.
boolean isPressedOnce(int key)
key
- key to check.
int getKeyCode()
char getKeyName()
boolean used()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |