Package lc.kra.system.keyboard.event
Class GlobalKeyEvent
- java.lang.Object
-
- java.util.EventObject
-
- lc.kra.system.keyboard.event.GlobalKeyEvent
-
- All Implemented Interfaces:
Serializable
public class GlobalKeyEvent extends EventObject
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intTS_DOWNKey transition states (up / down)static intTS_UPKey transition states (up / down)static intVK_0static intVK_1static intVK_2static intVK_3static intVK_4static intVK_5static intVK_6static intVK_7static intVK_8static intVK_9static intVK_Astatic intVK_ACCEPTstatic intVK_ADDstatic intVK_APPSstatic intVK_ATTNstatic intVK_Bstatic intVK_BACKstatic intVK_BROWSER_BACKstatic intVK_BROWSER_FAVORITESstatic intVK_BROWSER_FORWARDstatic intVK_BROWSER_HOMEstatic intVK_BROWSER_REFRESHstatic intVK_BROWSER_SEARCHstatic intVK_BROWSER_STOPstatic intVK_Cstatic intVK_CANCELstatic intVK_CAPITALstatic intVK_CLEARstatic intVK_CONTROLstatic intVK_CONVERTstatic intVK_CRSELstatic intVK_Dstatic intVK_DECIMALstatic intVK_DELETEstatic intVK_DIVIDEstatic intVK_DOWNstatic intVK_Estatic intVK_ENDstatic intVK_EREOFstatic intVK_ESCAPEstatic intVK_EXECUTEstatic intVK_EXSELstatic intVK_Fstatic intVK_F1static intVK_F10static intVK_F11static intVK_F12static intVK_F13static intVK_F14static intVK_F15static intVK_F16static intVK_F17static intVK_F18static intVK_F19static intVK_F2static intVK_F20static intVK_F21static intVK_F22static intVK_F23static intVK_F24static intVK_F3static intVK_F4static intVK_F5static intVK_F6static intVK_F7static intVK_F8static intVK_F9static intVK_FINALstatic intVK_Gstatic intVK_Hstatic intVK_HANGUELstatic intVK_HANGULstatic intVK_HANJAstatic intVK_HELPstatic intVK_HOMEstatic intVK_Istatic intVK_INSERTstatic intVK_Jstatic intVK_JUNJAstatic intVK_Kstatic intVK_KANAstatic intVK_KANJIstatic intVK_Lstatic intVK_LAUNCH_APP1static intVK_LAUNCH_APP2static intVK_LAUNCH_MAILstatic intVK_LAUNCH_MEDIA_SELECTstatic intVK_LBUTTONstatic intVK_LCONTROLstatic intVK_LEFTstatic intVK_LMENUstatic intVK_LSHIFTstatic intVK_LWINstatic intVK_Mstatic intVK_MBUTTONstatic intVK_MEDIA_NEXT_TRACKstatic intVK_MEDIA_PLAY_PAUSEstatic intVK_MEDIA_PREV_TRACKstatic intVK_MEDIA_STOPstatic intVK_MENUstatic intVK_MODECHANGEstatic intVK_MULTIPLYstatic intVK_Nstatic intVK_NEXTstatic intVK_NONAMEstatic intVK_NONCONVERTstatic intVK_NUMLOCKstatic intVK_NUMPAD0static intVK_NUMPAD1static intVK_NUMPAD2static intVK_NUMPAD3static intVK_NUMPAD4static intVK_NUMPAD5static intVK_NUMPAD6static intVK_NUMPAD7static intVK_NUMPAD8static intVK_NUMPAD9static intVK_Ostatic intVK_OEM_1static intVK_OEM_102static intVK_OEM_2static intVK_OEM_3static intVK_OEM_4static intVK_OEM_5static intVK_OEM_6static intVK_OEM_7static intVK_OEM_8static intVK_OEM_CLEARstatic intVK_OEM_COMMAstatic intVK_OEM_MINUSstatic intVK_OEM_PERIODstatic intVK_OEM_PLUSstatic intVK_Pstatic intVK_PA1static intVK_PACKETstatic intVK_PAUSEstatic intVK_PLAYstatic intVK_PRINTstatic intVK_PRIORstatic intVK_PROCESSKEYstatic intVK_Qstatic intVK_Rstatic intVK_RBUTTONstatic intVK_RCONTROLstatic intVK_RETURNstatic intVK_RIGHTstatic intVK_RMENUstatic intVK_RSHIFTstatic intVK_RWINstatic intVK_Sstatic intVK_SCROLLstatic intVK_SELECTstatic intVK_SEPARATORstatic intVK_SHIFTstatic intVK_SLEEPstatic intVK_SNAPSHOTstatic intVK_SPACEstatic intVK_SUBTRACTstatic intVK_Tstatic intVK_TABstatic intVK_Ustatic intVK_UNDEFINEDVirtual key codesstatic intVK_UPstatic intVK_Vstatic intVK_VOLUME_DOWNstatic intVK_VOLUME_MUTEstatic intVK_VOLUME_UPstatic intVK_Wstatic intVK_Xstatic intVK_XBUTTON1static intVK_XBUTTON2static intVK_Ystatic intVK_Zstatic intVK_ZOOM-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description GlobalKeyEvent(Object source, int virtualKeyCode, int transitionState, char keyChar, boolean menuPressed, boolean shiftPressed, boolean controlPressed, boolean winPressed, boolean extendedKey, long deviceHandle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDeviceHandle()chargetKeyChar()Returns the unicode keyChar of this key event.intgetTransitionState()Returns the transition state (up or down) for this key event.intgetVirtualKeyCode()Returns the integer virtualKeyCode associated with the key in this event.booleanisControlPressed()booleanisExtendedKey()booleanisMenuPressed()booleanisShiftPressed()booleanisWinPressed()StringtoString()Returns a String representation of this GlobalKeyEvent.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
TS_UP
public static final int TS_UP
Key transition states (up / down)- See Also:
- Constant Field Values
-
TS_DOWN
public static final int TS_DOWN
Key transition states (up / down)- See Also:
- Constant Field Values
-
VK_UNDEFINED
public static final int VK_UNDEFINED
Virtual key codes- See Also:
- Constant Field Values
-
VK_LBUTTON
public static final int VK_LBUTTON
- See Also:
- Constant Field Values
-
VK_RBUTTON
public static final int VK_RBUTTON
- See Also:
- Constant Field Values
-
VK_CANCEL
public static final int VK_CANCEL
- See Also:
- Constant Field Values
-
VK_MBUTTON
public static final int VK_MBUTTON
- See Also:
- Constant Field Values
-
VK_XBUTTON1
public static final int VK_XBUTTON1
- See Also:
- Constant Field Values
-
VK_XBUTTON2
public static final int VK_XBUTTON2
- See Also:
- Constant Field Values
-
VK_BACK
public static final int VK_BACK
- See Also:
- Constant Field Values
-
VK_TAB
public static final int VK_TAB
- See Also:
- Constant Field Values
-
VK_CLEAR
public static final int VK_CLEAR
- See Also:
- Constant Field Values
-
VK_RETURN
public static final int VK_RETURN
- See Also:
- Constant Field Values
-
VK_SHIFT
public static final int VK_SHIFT
- See Also:
- Constant Field Values
-
VK_CONTROL
public static final int VK_CONTROL
- See Also:
- Constant Field Values
-
VK_MENU
public static final int VK_MENU
- See Also:
- Constant Field Values
-
VK_PAUSE
public static final int VK_PAUSE
- See Also:
- Constant Field Values
-
VK_CAPITAL
public static final int VK_CAPITAL
- See Also:
- Constant Field Values
-
VK_KANA
public static final int VK_KANA
- See Also:
- Constant Field Values
-
VK_HANGUEL
public static final int VK_HANGUEL
- See Also:
- Constant Field Values
-
VK_HANGUL
public static final int VK_HANGUL
- See Also:
- Constant Field Values
-
VK_JUNJA
public static final int VK_JUNJA
- See Also:
- Constant Field Values
-
VK_FINAL
public static final int VK_FINAL
- See Also:
- Constant Field Values
-
VK_HANJA
public static final int VK_HANJA
- See Also:
- Constant Field Values
-
VK_KANJI
public static final int VK_KANJI
- See Also:
- Constant Field Values
-
VK_ESCAPE
public static final int VK_ESCAPE
- See Also:
- Constant Field Values
-
VK_CONVERT
public static final int VK_CONVERT
- See Also:
- Constant Field Values
-
VK_NONCONVERT
public static final int VK_NONCONVERT
- See Also:
- Constant Field Values
-
VK_ACCEPT
public static final int VK_ACCEPT
- See Also:
- Constant Field Values
-
VK_MODECHANGE
public static final int VK_MODECHANGE
- See Also:
- Constant Field Values
-
VK_SPACE
public static final int VK_SPACE
- See Also:
- Constant Field Values
-
VK_PRIOR
public static final int VK_PRIOR
- See Also:
- Constant Field Values
-
VK_NEXT
public static final int VK_NEXT
- See Also:
- Constant Field Values
-
VK_END
public static final int VK_END
- See Also:
- Constant Field Values
-
VK_HOME
public static final int VK_HOME
- See Also:
- Constant Field Values
-
VK_LEFT
public static final int VK_LEFT
- See Also:
- Constant Field Values
-
VK_UP
public static final int VK_UP
- See Also:
- Constant Field Values
-
VK_RIGHT
public static final int VK_RIGHT
- See Also:
- Constant Field Values
-
VK_DOWN
public static final int VK_DOWN
- See Also:
- Constant Field Values
-
VK_SELECT
public static final int VK_SELECT
- See Also:
- Constant Field Values
-
VK_PRINT
public static final int VK_PRINT
- See Also:
- Constant Field Values
-
VK_EXECUTE
public static final int VK_EXECUTE
- See Also:
- Constant Field Values
-
VK_SNAPSHOT
public static final int VK_SNAPSHOT
- See Also:
- Constant Field Values
-
VK_INSERT
public static final int VK_INSERT
- See Also:
- Constant Field Values
-
VK_DELETE
public static final int VK_DELETE
- See Also:
- Constant Field Values
-
VK_HELP
public static final int VK_HELP
- See Also:
- Constant Field Values
-
VK_0
public static final int VK_0
- See Also:
- Constant Field Values
-
VK_1
public static final int VK_1
- See Also:
- Constant Field Values
-
VK_2
public static final int VK_2
- See Also:
- Constant Field Values
-
VK_3
public static final int VK_3
- See Also:
- Constant Field Values
-
VK_4
public static final int VK_4
- See Also:
- Constant Field Values
-
VK_5
public static final int VK_5
- See Also:
- Constant Field Values
-
VK_6
public static final int VK_6
- See Also:
- Constant Field Values
-
VK_7
public static final int VK_7
- See Also:
- Constant Field Values
-
VK_8
public static final int VK_8
- See Also:
- Constant Field Values
-
VK_9
public static final int VK_9
- See Also:
- Constant Field Values
-
VK_A
public static final int VK_A
- See Also:
- Constant Field Values
-
VK_B
public static final int VK_B
- See Also:
- Constant Field Values
-
VK_C
public static final int VK_C
- See Also:
- Constant Field Values
-
VK_D
public static final int VK_D
- See Also:
- Constant Field Values
-
VK_E
public static final int VK_E
- See Also:
- Constant Field Values
-
VK_F
public static final int VK_F
- See Also:
- Constant Field Values
-
VK_G
public static final int VK_G
- See Also:
- Constant Field Values
-
VK_H
public static final int VK_H
- See Also:
- Constant Field Values
-
VK_I
public static final int VK_I
- See Also:
- Constant Field Values
-
VK_J
public static final int VK_J
- See Also:
- Constant Field Values
-
VK_K
public static final int VK_K
- See Also:
- Constant Field Values
-
VK_L
public static final int VK_L
- See Also:
- Constant Field Values
-
VK_M
public static final int VK_M
- See Also:
- Constant Field Values
-
VK_N
public static final int VK_N
- See Also:
- Constant Field Values
-
VK_O
public static final int VK_O
- See Also:
- Constant Field Values
-
VK_P
public static final int VK_P
- See Also:
- Constant Field Values
-
VK_Q
public static final int VK_Q
- See Also:
- Constant Field Values
-
VK_R
public static final int VK_R
- See Also:
- Constant Field Values
-
VK_S
public static final int VK_S
- See Also:
- Constant Field Values
-
VK_T
public static final int VK_T
- See Also:
- Constant Field Values
-
VK_U
public static final int VK_U
- See Also:
- Constant Field Values
-
VK_V
public static final int VK_V
- See Also:
- Constant Field Values
-
VK_W
public static final int VK_W
- See Also:
- Constant Field Values
-
VK_X
public static final int VK_X
- See Also:
- Constant Field Values
-
VK_Y
public static final int VK_Y
- See Also:
- Constant Field Values
-
VK_Z
public static final int VK_Z
- See Also:
- Constant Field Values
-
VK_LWIN
public static final int VK_LWIN
- See Also:
- Constant Field Values
-
VK_RWIN
public static final int VK_RWIN
- See Also:
- Constant Field Values
-
VK_APPS
public static final int VK_APPS
- See Also:
- Constant Field Values
-
VK_SLEEP
public static final int VK_SLEEP
- See Also:
- Constant Field Values
-
VK_NUMPAD0
public static final int VK_NUMPAD0
- See Also:
- Constant Field Values
-
VK_NUMPAD1
public static final int VK_NUMPAD1
- See Also:
- Constant Field Values
-
VK_NUMPAD2
public static final int VK_NUMPAD2
- See Also:
- Constant Field Values
-
VK_NUMPAD3
public static final int VK_NUMPAD3
- See Also:
- Constant Field Values
-
VK_NUMPAD4
public static final int VK_NUMPAD4
- See Also:
- Constant Field Values
-
VK_NUMPAD5
public static final int VK_NUMPAD5
- See Also:
- Constant Field Values
-
VK_NUMPAD6
public static final int VK_NUMPAD6
- See Also:
- Constant Field Values
-
VK_NUMPAD7
public static final int VK_NUMPAD7
- See Also:
- Constant Field Values
-
VK_NUMPAD8
public static final int VK_NUMPAD8
- See Also:
- Constant Field Values
-
VK_NUMPAD9
public static final int VK_NUMPAD9
- See Also:
- Constant Field Values
-
VK_MULTIPLY
public static final int VK_MULTIPLY
- See Also:
- Constant Field Values
-
VK_ADD
public static final int VK_ADD
- See Also:
- Constant Field Values
-
VK_SEPARATOR
public static final int VK_SEPARATOR
- See Also:
- Constant Field Values
-
VK_SUBTRACT
public static final int VK_SUBTRACT
- See Also:
- Constant Field Values
-
VK_DECIMAL
public static final int VK_DECIMAL
- See Also:
- Constant Field Values
-
VK_DIVIDE
public static final int VK_DIVIDE
- See Also:
- Constant Field Values
-
VK_F1
public static final int VK_F1
- See Also:
- Constant Field Values
-
VK_F2
public static final int VK_F2
- See Also:
- Constant Field Values
-
VK_F3
public static final int VK_F3
- See Also:
- Constant Field Values
-
VK_F4
public static final int VK_F4
- See Also:
- Constant Field Values
-
VK_F5
public static final int VK_F5
- See Also:
- Constant Field Values
-
VK_F6
public static final int VK_F6
- See Also:
- Constant Field Values
-
VK_F7
public static final int VK_F7
- See Also:
- Constant Field Values
-
VK_F8
public static final int VK_F8
- See Also:
- Constant Field Values
-
VK_F9
public static final int VK_F9
- See Also:
- Constant Field Values
-
VK_F10
public static final int VK_F10
- See Also:
- Constant Field Values
-
VK_F11
public static final int VK_F11
- See Also:
- Constant Field Values
-
VK_F12
public static final int VK_F12
- See Also:
- Constant Field Values
-
VK_F13
public static final int VK_F13
- See Also:
- Constant Field Values
-
VK_F14
public static final int VK_F14
- See Also:
- Constant Field Values
-
VK_F15
public static final int VK_F15
- See Also:
- Constant Field Values
-
VK_F16
public static final int VK_F16
- See Also:
- Constant Field Values
-
VK_F17
public static final int VK_F17
- See Also:
- Constant Field Values
-
VK_F18
public static final int VK_F18
- See Also:
- Constant Field Values
-
VK_F19
public static final int VK_F19
- See Also:
- Constant Field Values
-
VK_F20
public static final int VK_F20
- See Also:
- Constant Field Values
-
VK_F21
public static final int VK_F21
- See Also:
- Constant Field Values
-
VK_F22
public static final int VK_F22
- See Also:
- Constant Field Values
-
VK_F23
public static final int VK_F23
- See Also:
- Constant Field Values
-
VK_F24
public static final int VK_F24
- See Also:
- Constant Field Values
-
VK_NUMLOCK
public static final int VK_NUMLOCK
- See Also:
- Constant Field Values
-
VK_SCROLL
public static final int VK_SCROLL
- See Also:
- Constant Field Values
-
VK_LSHIFT
public static final int VK_LSHIFT
- See Also:
- Constant Field Values
-
VK_RSHIFT
public static final int VK_RSHIFT
- See Also:
- Constant Field Values
-
VK_LCONTROL
public static final int VK_LCONTROL
- See Also:
- Constant Field Values
-
VK_RCONTROL
public static final int VK_RCONTROL
- See Also:
- Constant Field Values
-
VK_LMENU
public static final int VK_LMENU
- See Also:
- Constant Field Values
-
VK_RMENU
public static final int VK_RMENU
- See Also:
- Constant Field Values
-
VK_BROWSER_BACK
public static final int VK_BROWSER_BACK
- See Also:
- Constant Field Values
-
VK_BROWSER_FORWARD
public static final int VK_BROWSER_FORWARD
- See Also:
- Constant Field Values
-
VK_BROWSER_REFRESH
public static final int VK_BROWSER_REFRESH
- See Also:
- Constant Field Values
-
VK_BROWSER_STOP
public static final int VK_BROWSER_STOP
- See Also:
- Constant Field Values
-
VK_BROWSER_SEARCH
public static final int VK_BROWSER_SEARCH
- See Also:
- Constant Field Values
-
VK_BROWSER_FAVORITES
public static final int VK_BROWSER_FAVORITES
- See Also:
- Constant Field Values
-
VK_BROWSER_HOME
public static final int VK_BROWSER_HOME
- See Also:
- Constant Field Values
-
VK_VOLUME_MUTE
public static final int VK_VOLUME_MUTE
- See Also:
- Constant Field Values
-
VK_VOLUME_DOWN
public static final int VK_VOLUME_DOWN
- See Also:
- Constant Field Values
-
VK_VOLUME_UP
public static final int VK_VOLUME_UP
- See Also:
- Constant Field Values
-
VK_MEDIA_NEXT_TRACK
public static final int VK_MEDIA_NEXT_TRACK
- See Also:
- Constant Field Values
-
VK_MEDIA_PREV_TRACK
public static final int VK_MEDIA_PREV_TRACK
- See Also:
- Constant Field Values
-
VK_MEDIA_STOP
public static final int VK_MEDIA_STOP
- See Also:
- Constant Field Values
-
VK_MEDIA_PLAY_PAUSE
public static final int VK_MEDIA_PLAY_PAUSE
- See Also:
- Constant Field Values
-
VK_LAUNCH_MAIL
public static final int VK_LAUNCH_MAIL
- See Also:
- Constant Field Values
-
VK_LAUNCH_MEDIA_SELECT
public static final int VK_LAUNCH_MEDIA_SELECT
- See Also:
- Constant Field Values
-
VK_LAUNCH_APP1
public static final int VK_LAUNCH_APP1
- See Also:
- Constant Field Values
-
VK_LAUNCH_APP2
public static final int VK_LAUNCH_APP2
- See Also:
- Constant Field Values
-
VK_OEM_1
public static final int VK_OEM_1
- See Also:
- Constant Field Values
-
VK_OEM_PLUS
public static final int VK_OEM_PLUS
- See Also:
- Constant Field Values
-
VK_OEM_COMMA
public static final int VK_OEM_COMMA
- See Also:
- Constant Field Values
-
VK_OEM_MINUS
public static final int VK_OEM_MINUS
- See Also:
- Constant Field Values
-
VK_OEM_PERIOD
public static final int VK_OEM_PERIOD
- See Also:
- Constant Field Values
-
VK_OEM_2
public static final int VK_OEM_2
- See Also:
- Constant Field Values
-
VK_OEM_3
public static final int VK_OEM_3
- See Also:
- Constant Field Values
-
VK_OEM_4
public static final int VK_OEM_4
- See Also:
- Constant Field Values
-
VK_OEM_5
public static final int VK_OEM_5
- See Also:
- Constant Field Values
-
VK_OEM_6
public static final int VK_OEM_6
- See Also:
- Constant Field Values
-
VK_OEM_7
public static final int VK_OEM_7
- See Also:
- Constant Field Values
-
VK_OEM_8
public static final int VK_OEM_8
- See Also:
- Constant Field Values
-
VK_OEM_102
public static final int VK_OEM_102
- See Also:
- Constant Field Values
-
VK_PROCESSKEY
public static final int VK_PROCESSKEY
- See Also:
- Constant Field Values
-
VK_PACKET
public static final int VK_PACKET
- See Also:
- Constant Field Values
-
VK_ATTN
public static final int VK_ATTN
- See Also:
- Constant Field Values
-
VK_CRSEL
public static final int VK_CRSEL
- See Also:
- Constant Field Values
-
VK_EXSEL
public static final int VK_EXSEL
- See Also:
- Constant Field Values
-
VK_EREOF
public static final int VK_EREOF
- See Also:
- Constant Field Values
-
VK_PLAY
public static final int VK_PLAY
- See Also:
- Constant Field Values
-
VK_ZOOM
public static final int VK_ZOOM
- See Also:
- Constant Field Values
-
VK_NONAME
public static final int VK_NONAME
- See Also:
- Constant Field Values
-
VK_PA1
public static final int VK_PA1
- See Also:
- Constant Field Values
-
VK_OEM_CLEAR
public static final int VK_OEM_CLEAR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GlobalKeyEvent
public GlobalKeyEvent(Object source, int virtualKeyCode, int transitionState, char keyChar, boolean menuPressed, boolean shiftPressed, boolean controlPressed, boolean winPressed, boolean extendedKey, long deviceHandle)
-
-
Method Detail
-
getVirtualKeyCode
public int getVirtualKeyCode()
Returns the integer virtualKeyCode associated with the key in this event.- Returns:
- the integer code for an actual key on the keyboard.
-
getKeyChar
public char getKeyChar()
Returns the unicode keyChar of this key event.- Returns:
- the unicode value of the actual key on the keyboard.
-
getTransitionState
public int getTransitionState()
Returns the transition state (up or down) for this key event.
-
isMenuPressed
public boolean isMenuPressed()
- Returns:
- true if the menu key (alt) is pressed on the keyboard.
-
isShiftPressed
public boolean isShiftPressed()
- Returns:
- true if the shift key is pressed on the keyboard.
-
isControlPressed
public boolean isControlPressed()
- Returns:
- true if the control key is pressed on the keyboard.
-
isWinPressed
public boolean isWinPressed()
- Returns:
- true if the windows key is pressed on the keyboard.
-
isExtendedKey
public boolean isExtendedKey()
- Returns:
- true if the menu/shift/control/win key pressed is an extended key.
-
getDeviceHandle
public long getDeviceHandle()
- Returns:
- the handle of the keyboard the key was pressed on.
-
toString
public String toString()
Returns a String representation of this GlobalKeyEvent.- Overrides:
toStringin classEventObject- Returns:
- A a String representation of this GlobalKeyEvent.
-
-