charva.awt.event
Class KeyAdapter
java.lang.Object
charva.awt.event.KeyAdapter
- EventListener, KeyListener
public abstract class KeyAdapter
extends java.lang.Object
An abstract class for receiving key events. The methods provided in this
class are empty; the class is provided as a convenience for implementing
the KeyListener interface. You only have to implement the methods you
are interested in.
void | keyPressed(KeyEvent ke) - KEY_PRESSED events are fired when any key (including a function
key and cursor key) is pressed while the component has keyboard
input focus.
|
void | keyReleased(KeyEvent ke) - This method is never called in CHARVA, but is present for
compatibility with javax.swing.
|
void | keyTyped(KeyEvent ke) - KEY_TYPED events are fired when a key representing a valid text
character (not a function key or cursor key) is pressed.
|
keyPressed
public void keyPressed(KeyEvent ke)
KEY_PRESSED events are fired when any key (including a function
key and cursor key) is pressed while the component has keyboard
input focus.
KeyEvent.getKeyCode() can be used to find out which key was pressed.
- keyPressed in interface KeyListener
keyReleased
public void keyReleased(KeyEvent ke)
This method is never called in CHARVA, but is present for
compatibility with javax.swing.
- keyReleased in interface KeyListener
keyTyped
public void keyTyped(KeyEvent ke)
KEY_TYPED events are fired when a key representing a valid text
character (not a function key or cursor key) is pressed.
KeyEvent.getKeyChar() can be used to get the ASCII code of the key
that was pressed.
- keyTyped in interface KeyListener