public interface Keyboard
Modifier and Type | Method and Description |
---|---|
Integer |
getKeyCode()
Get the current pressed key code.
|
char |
getKeyName()
Get the current pressed key name.
|
String |
getKeyText(int code)
Get the text key of the key code.
|
boolean |
isPressed(Integer key)
Check if the key is currently pressed.
|
boolean |
isPressedOnce(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(Integer key)
key
- The key to check.true
if pressed, false
else.boolean isPressedOnce(Integer key)
key
- The key to check.true
if pressed, false
else.Integer getKeyCode()
char getKeyName()
String getKeyText(int code)
code
- The key code.boolean used()
true
if has at least on pressed key, false
else (no pressed key).Copyright © 2014 Byron 3D Games Studio. All rights reserved.