Constructor and Description |
---|
KeyboardInput() |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
public boolean isPressed(int key)
Keyboard
public int getKeyCode()
Keyboard
getKeyCode
in interface Keyboard
public char getKeyName()
Keyboard
getKeyName
in interface Keyboard
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener