charva.awt.event
Interface KeyListener
- EventListener
- AbstractButton, DateEntryField, JButton, JCheckBox, JMenu, JMenuItem, JRadioButton, KeyAdapter
public interface KeyListener
The listener interface for receiving KeyEvents.
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.
keyReleased
public void keyReleased(KeyEvent ke_)
This method is never called in CHARVA, but is present for
compatibility with javax.swing.
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.