public interface Keyboard
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getKeyCode()
Get the current pressed key code.
|
char |
getKeyName()
Get the current pressed key name.
|
boolean |
isPressed(java.lang.Integer key)
Check if the key is currently pressed.
|
boolean |
isPressedOnce(java.lang.Integer key)
Check if the key is currently pressed (not continuously).
|
boolean |
used()
Check if the keyboard is currently used (at least one pressed key).
|
boolean isPressed(java.lang.Integer key)
key
- The key to check.true
if pressed, false
else.boolean isPressedOnce(java.lang.Integer key)
key
- The key to check.true
if pressed, false
else.java.lang.Integer getKeyCode()
char getKeyName()
boolean used()
true
if has at least on pressed key, false
else (no pressed key).