i need to know the state of shift and fn(alt) on physical keyboard when they are pressed or get locked.
i know the KeyEvent
class have methods like isAltPressed()
and isShiftPressed()
, this works fine when shift or fn pressed one time, but when they pressed twice and get locked i can not find out if this key is locked or not.
also the getMetaState()
return 0 when shift or fn is locked and i press another key like p
so is there any method like isShiftLocked()
or isAltLocked()
or something like this ?