charva.awt.event
Class KeyEvent
java.lang.Object
java.util.EventObject
charva.awt.event.AWTEvent
charva.awt.event.InputEvent
charva.awt.event.KeyEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class KeyEvent
- extends InputEvent
An event which indicates that a keystroke occurred in an object.
- See Also:
- Serialized Form
Fields inherited from class charva.awt.event.AWTEvent |
ACTION_PERFORMED, ADJUSTMENT_EVENT, FOCUS_GAINED, FOCUS_LOST, GARBAGE_COLLECTION, INVOCATION_EVENT, ITEM_STATE_CHANGED, LIST_SELECTION, MOUSE_EVENT, PAINT_EVENT, RESERVED_ID_MAX, SCROLL_EVENT, SYNC_EVENT, WINDOW_CLOSING, WINDOW_OPENED |
Fields inherited from class java.util.EventObject |
source |
Method Summary |
char |
getKeyChar()
Return the character (in the case of a KEY_TYPED event). |
int |
getKeyCode()
Return the integer key code. |
boolean |
isActionKey()
Returns true if the key code is greater than 255, indicating
that it is a function key. |
void |
setKeyCode(int key_)
Set the key code to indicate a physical key was pressed |
java.lang.String |
toString()
|
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
KEY_PRESSED
public static final int KEY_PRESSED
- See Also:
- Constant Field Values
KEY_TYPED
public static final int KEY_TYPED
- See Also:
- Constant Field Values
CHAR_UNDEFINED
public static final char CHAR_UNDEFINED
- KEY_PRESSED events that don't map to a valid character
cause the keyPressed() method to return this value.
- See Also:
- Constant Field Values
VK_ESCAPE
public static final int VK_ESCAPE
- See Also:
- Constant Field Values
VK_DOWN
public static final int VK_DOWN
- See Also:
- Constant Field Values
VK_UP
public static final int VK_UP
- See Also:
- Constant Field Values
VK_LEFT
public static final int VK_LEFT
- See Also:
- Constant Field Values
VK_RIGHT
public static final int VK_RIGHT
- See Also:
- Constant Field Values
VK_HOME
public static final int VK_HOME
- See Also:
- Constant Field Values
VK_BACK_SPACE
public static final int VK_BACK_SPACE
- See Also:
- Constant Field Values
VK_F1
public static final int VK_F1
- See Also:
- Constant Field Values
VK_F2
public static final int VK_F2
- See Also:
- Constant Field Values
VK_F3
public static final int VK_F3
- See Also:
- Constant Field Values
VK_F4
public static final int VK_F4
- See Also:
- Constant Field Values
VK_F5
public static final int VK_F5
- See Also:
- Constant Field Values
VK_F6
public static final int VK_F6
- See Also:
- Constant Field Values
VK_F7
public static final int VK_F7
- See Also:
- Constant Field Values
VK_F8
public static final int VK_F8
- See Also:
- Constant Field Values
VK_F9
public static final int VK_F9
- See Also:
- Constant Field Values
VK_F10
public static final int VK_F10
- See Also:
- Constant Field Values
VK_F11
public static final int VK_F11
- See Also:
- Constant Field Values
VK_F12
public static final int VK_F12
- See Also:
- Constant Field Values
VK_F13
public static final int VK_F13
- See Also:
- Constant Field Values
VK_F14
public static final int VK_F14
- See Also:
- Constant Field Values
VK_F15
public static final int VK_F15
- See Also:
- Constant Field Values
VK_F16
public static final int VK_F16
- See Also:
- Constant Field Values
VK_F17
public static final int VK_F17
- See Also:
- Constant Field Values
VK_F18
public static final int VK_F18
- See Also:
- Constant Field Values
VK_F19
public static final int VK_F19
- See Also:
- Constant Field Values
VK_F20
public static final int VK_F20
- See Also:
- Constant Field Values
VK_DELETE
public static final int VK_DELETE
- See Also:
- Constant Field Values
VK_INSERT
public static final int VK_INSERT
- See Also:
- Constant Field Values
VK_PAGE_DOWN
public static final int VK_PAGE_DOWN
- See Also:
- Constant Field Values
VK_PAGE_UP
public static final int VK_PAGE_UP
- See Also:
- Constant Field Values
VK_ENTER
public static final int VK_ENTER
- See Also:
- Constant Field Values
VK_BACK_TAB
public static final int VK_BACK_TAB
- See Also:
- Constant Field Values
VK_END
public static final int VK_END
- See Also:
- Constant Field Values
KeyEvent
public KeyEvent(int key_,
int id_,
Component source_)
getKeyCode
public int getKeyCode()
- Return the integer key code.
getKeyChar
public char getKeyChar()
- Return the character (in the case of a KEY_TYPED event).
setKeyCode
public void setKeyCode(int key_)
- Set the key code to indicate a physical key was pressed
isActionKey
public boolean isActionKey()
- Returns true if the key code is greater than 255, indicating
that it is a function key.
toString
public java.lang.String toString()