|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.util.KeyEventSequencer
public class KeyEventSequencer
A class that can be made to listen to all key events within the virtual machine and maintain the the keys that are currently pressed. It does not consume any key events.
| Method Summary | |
|---|---|
boolean |
dispatchKeyEvent(java.awt.event.KeyEvent e)
|
static KeySequence |
getCurrentSequence()
Returns the key sequence that is pressed right now. |
static boolean |
isDown(int keyCode)
Returns if the key is currently pressed |
static boolean |
isDown(java.util.List keyCodes,
boolean checkOrder)
Returns if the key is currently pressed |
static void |
start()
Starts the sequncer, if not already started. |
static void |
stop()
Reduces the invocation count by one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void start()
public static void stop()
IllegalStateException
will be thrown.
public static boolean isDown(int keyCode)
keyCode - The key to test. 'f' will work, as will KeyEvent.VK_SHIFT.
public static KeySequence getCurrentSequence()
null.
public static boolean isDown(java.util.List keyCodes,
boolean checkOrder)
keyCodes - The keys to test. 'f' will work, as will KeyEvent.VK_SHIFT. Not null.checkOrder - If true the order in which the keys where pressed must be same as well.
public boolean dispatchKeyEvent(java.awt.event.KeyEvent e)
dispatchKeyEvent in interface java.awt.KeyEventDispatcher
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||