Uses of Enum Class
javafx.scene.input.KeyCode
Packages that use KeyCode
Package
Description
Provides the application life-cycle classes.
Provides the set of classes for mouse and keyboard input event handling.
Provides API for simulating user interaction such as typing keys on the keyboard and using the mouse.
Incubates a customization mechanism for the JavaFX Controls utilizing the
InputMap
.-
Uses of KeyCode in javafx.application
Methods in javafx.application with parameters of type KeyCodeModifier and TypeMethodDescriptionPlatform.isKeyLocked
(KeyCode keyCode) Returns a flag indicating whether the key corresponding tokeyCode
is in the locked (or "on") state. -
Uses of KeyCode in javafx.scene.input
Subclasses with type arguments of type KeyCode in javafx.scene.inputMethods in javafx.scene.input that return KeyCodeModifier and TypeMethodDescriptionfinal KeyCode
KeyCodeCombination.getCode()
Gets the key code associated with this key combination.final KeyCode
KeyEvent.getCode()
The key code associated with the key in this key pressed or key released event.KeyCombination.Modifier.getKey()
Gets the modifier key of thisModifier
.static KeyCode
KeyCode.getKeyCode
(String name) Parses textual representation of a key.static KeyCode
Returns the enum constant of this class with the specified name.static KeyCode[]
KeyCode.values()
Returns an array containing the constants of this enum class, in the order they are declared.Constructors in javafx.scene.input with parameters of type KeyCodeModifierConstructorDescriptionKeyCodeCombination
(KeyCode code, KeyCombination.Modifier... modifiers) Constructs aKeyCodeCombination
for the specified main key and with the specified list of modifiers.KeyCodeCombination
(KeyCode code, KeyCombination.ModifierValue shift, KeyCombination.ModifierValue control, KeyCombination.ModifierValue alt, KeyCombination.ModifierValue meta, KeyCombination.ModifierValue shortcut) Constructs aKeyCodeCombination
for the specified main key and with an explicit specification of all modifier keys.KeyEvent
(Object source, EventTarget target, EventType<KeyEvent> eventType, String character, String text, KeyCode code, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown) Constructs a newKeyEvent
event from the specified parameters.KeyEvent
(EventType<KeyEvent> eventType, String character, String text, KeyCode code, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown) Constructs a newKeyEvent
event from the specified parameters, with anull
source and target. -
Uses of KeyCode in javafx.scene.robot
Methods in javafx.scene.robot with parameters of type KeyCode -
Uses of KeyCode in jfx.incubator.scene.control.input
Methods in jfx.incubator.scene.control.input that return KeyCodeModifier and TypeMethodDescriptionKeyBinding.getKeyCode()
Returns theKeyCode
, or null if the key binding is not for a key code.Methods in jfx.incubator.scene.control.input with parameters of type KeyCodeModifier and TypeMethodDescriptionstatic KeyBinding
Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and thealt
key modifier (option
on macOS).static KeyBinding.Builder
Creates aKeyBinding.Builder
with the specifiedKeyCode
.static KeyBinding
This utility method creates aKeyBinding
which corresponds to the key press with the specifiedKeyCode
and the macOS⌘ command
key modifier.static KeyBinding
Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and thectrl
key modifier (control
on macOS).static KeyBinding
KeyBinding.controlShift
(KeyCode code) Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and theshift
+ctrl
key modifier (control
on macOS).static KeyBinding
Creates aKeyBinding
which corresponds to the key press with the specifiedKeyCode
.static KeyBinding
Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and theoption
key modifier on macOS.static KeyBinding
Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and theshift
key modifier.static KeyBinding
KeyBinding.shiftOption
(KeyCode code) Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and theshift
+option
key modifiers on macOS.static KeyBinding
KeyBinding.shiftShortcut
(KeyCode code) Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and theshift
+ shortcut key modifier (⌘ command
on macOS,ctrl
elsewhere).static KeyBinding
Creates a KeyBinding which corresponds to the key press with the specifiedKeyCode
and the shortcut key modifier (⌘ command
on macOS,ctrl
elsewhere).KeyBinding.withNewKeyCode
(KeyCode newCode) Creates a new instance ofKeyBinding
with the newKeyCode
and the same set of the modifiers.