class KeyState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private IntSet |
keysPressed |
private int |
modifiers |
private MonocleWindow |
window |
Constructor and Description |
---|
KeyState() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
clear()
Removes all pressed keys from this state object.
|
(package private) void |
copyTo(KeyState target)
Copies the contents of this state object to another.
|
(package private) IntSet |
getKeysPressed()
Returns the set of pressed key codes
|
private static int |
getModifier(int virtualKeyCode) |
(package private) int |
getModifiers()
Returns a mask of modifiers defined in KeyEvent for the keys pressed
in this state.
|
(package private) MonocleWindow |
getWindow(boolean recalculateCache)
Returns the Glass window on which this event state is located .
|
(package private) boolean |
isControlPressed() |
(package private) boolean |
isShiftPressed() |
(package private) void |
pressKey(int virtualKeyCode)
Adds a key to the set of pressed keys.
|
(package private) void |
releaseKey(int virtualKeyCode)
Removes a key from the set of pressed keys.
|
java.lang.String |
toString() |
private IntSet keysPressed
private MonocleWindow window
private int modifiers
void clear()
void pressKey(int virtualKeyCode)
void releaseKey(int virtualKeyCode)
void copyTo(KeyState target)
target
- The KeyState to which to copy this state's data.IntSet getKeysPressed()
MonocleWindow getWindow(boolean recalculateCache)
private static int getModifier(int virtualKeyCode)
int getModifiers()
boolean isShiftPressed()
boolean isControlPressed()
public java.lang.String toString()
toString
in class java.lang.Object