public class GraphicsNodeKeyEvent extends GraphicsNodeInputEvent
Modifier and Type | Field and Description |
---|---|
static int |
KEY_PRESSED
The "key pressed" event.
|
static int |
KEY_RELEASED
The "key released" event.
|
static int |
KEY_TYPED
The "key typed" event.
|
protected char |
keyChar
keyChar is a valid unicode character
that is fired by a key or a key combination on
a keyboard. |
protected int |
keyCode
The unique value assigned to each of the keys on the
keyboard.
|
protected int |
keyLocation
The key location.
|
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CAPS_LOCK_MASK, CTRL_MASK, KANA_LOCK_MASK, META_MASK, NUM_LOCK_MASK, SCROLL_LOCK_MASK, SHIFT_MASK
id
Constructor and Description |
---|
GraphicsNodeKeyEvent(GraphicsNode source,
int id,
long when,
int modifiers,
int lockState,
int keyCode,
char keyChar,
int keyLocation)
Constructs a new graphics node key event.
|
Modifier and Type | Method and Description |
---|---|
char |
getKeyChar()
Return a character corresponding to physical key pressed.
|
int |
getKeyCode()
Return the integer code for the physical key pressed.
|
int |
getKeyLocation()
Returns the key location.
|
getLockState, getModifiers, getWhen, isAltDown, isAltGraphDown, isControlDown, isMetaDown, isShiftDown
consume, getGraphicsNode, getID, isConsumed
public static final int KEY_TYPED
public static final int KEY_PRESSED
public static final int KEY_RELEASED
protected int keyCode
protected char keyChar
keyChar
is a valid unicode character
that is fired by a key or a key combination on
a keyboard.protected int keyLocation
public GraphicsNodeKeyEvent(GraphicsNode source, int id, long when, int modifiers, int lockState, int keyCode, char keyChar, int keyLocation)
source
- the graphics node where the event originatedid
- the id of this eventwhen
- the time the event occurredmodifiers
- the modifier keys down while event occurredlockState
- bitmask indicating which key locks were activatedkeyCode
- the Java key codekeyChar
- the generated characterkeyLocation
- the location of the keyCopyright © 2022 Apache Software Foundation. All Rights Reserved.