java.awt.event.KeyListener
, java.util.EventListener
public class Input
extends java.lang.Object
implements java.awt.event.KeyListener
Constructor | Description |
---|---|
Input() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
keyClicked(int keyCode) |
Checks if key has been clicked ('pressed once').
|
boolean |
keyDown(int keyCode) |
Checks if key has is down.
|
void |
keyPressed(java.awt.event.KeyEvent e) |
|
void |
keyReleased(java.awt.event.KeyEvent e) |
|
void |
keyTyped(java.awt.event.KeyEvent arg0) |
public boolean keyClicked(int keyCode)
keyCode
- key code of the key to be checked.public boolean keyDown(int keyCode)
keyCode
- key code of the key to be checked.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 arg0)
keyTyped
in interface java.awt.event.KeyListener