Key
Contains information relevant to a keyboard input.
The Key class allows for input comparisons to be as easy as possible.
Keys are supplied in the keyboard input methods on the Window class.
public void keyDown(Key key) {
if (key == Key.SPACE) {
print("Space key pressed!");
}
}
Last modified 2yr ago