Determine modifier key state without an InputEvent object in Java
Posted
by heycam
on Stack Overflow
See other posts from Stack Overflow
or by heycam
Published on 2010-06-16T01:33:13Z
Indexed on
2010/06/16
1:42 UTC
Read the original article
Hit count: 282
I need to determine the current state of the Shift key, but at the time I need the state I don't have an InputEvent
object around. I need something like java.awt.Toolkit.getLockingKeyState(int)
that works for Shift, not just the locking keys like VK_CAPS_LOCK
. Is there a way I can do this without listening to input events and storing the for later when I need to check the state?
Thanks!
© Stack Overflow or respective owner