Uses of Class
javafx.scene.input.KeyCode
| Package | Description |
|---|---|
| javafx.scene.input |
Provides the set of classes for mouse and keyboard input event handling.
|
| javafx.scene.robot |
Provides API for simulating user interaction such as typing keys on the keyboard and using the mouse.
|
-
Uses of KeyCode in javafx.scene.input
Methods in javafx.scene.input that return KeyCode Modifier and Type Method Description KeyCodeKeyCodeCombination. getCode()Gets the key code associated with this key combination.KeyCodeKeyEvent. getCode()The key code associated with the key in this key pressed or key released event.KeyCodeKeyCombination.Modifier. getKey()Gets the modifier key of thisModifier.static KeyCodeKeyCode. getKeyCode(String name)Parses textual representation of a key.static KeyCodeKeyCode. valueOf(String name)Returns the enum constant of this type with the specified name.static KeyCode[]KeyCode. values()Returns an array containing the constants of this enum type, in the order they are declared.Constructors in javafx.scene.input with parameters of type KeyCode Constructor Description KeyCodeCombination(KeyCode code, KeyCombination.Modifier... modifiers)Constructs aKeyCodeCombinationfor 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 aKeyCodeCombinationfor 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 newKeyEventevent from the specified parameters.KeyEvent(EventType<KeyEvent> eventType, String character, String text, KeyCode code, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown)Constructs a newKeyEventevent from the specified parameters, with anullsource and target. -
Uses of KeyCode in javafx.scene.robot
Methods in javafx.scene.robot with parameters of type KeyCode Modifier and Type Method Description voidRobot. keyPress(KeyCode keyCode)Presses the specifiedKeyCodekey.voidRobot. keyRelease(KeyCode keyCode)Releases the specifiedKeyCodekey.voidRobot. keyType(KeyCode keyCode)Types the specifiedKeyCodekey.