Package com.teamdev.jxbrowser.ui.event
Interface KeyPressed
- All Superinterfaces:
KeyEvent
An event indicating that a keyboard key has been pressed.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault charkeyChar()Returns the character corresponding to the pressed key or 0 when a keyboard modifier such as Shift, Ctrl, Alt, Command, Win etc.default KeyCodekeyCode()Returns the code of the key.default KeyLocationReturns the location of the key on the keyboard.default KeyModifiersReturns the keyboard modifiers applied.static KeyPressed.BuildernewBuilder(KeyCode keyCode) Creates a newKeyPressedbuilder with the given required parameters.
-
Method Details
-
newBuilder
Creates a newKeyPressedbuilder with the given required parameters.- Parameters:
keyCode- the code of the key- Returns:
- a new
KeyPressed.Builderinstance
-
keyCode
Description copied from interface:KeyEventReturns the code of the key. -
keyModifiers
Description copied from interface:KeyEventReturns the keyboard modifiers applied.- Specified by:
keyModifiersin interfaceKeyEvent
-
keyLocation
Description copied from interface:KeyEventReturns the location of the key on the keyboard.- Specified by:
keyLocationin interfaceKeyEvent
-
keyChar
default char keyChar()Returns the character corresponding to the pressed key or 0 when a keyboard modifier such as Shift, Ctrl, Alt, Command, Win etc. has been pressed on its own.Please note that the key character is 0 for all keys in the
OFF_SCREENmode on Linux and Windows. On macOS, it is always 0, regardless of the rendering mode.
-