Uses of Class javafx.scene.input.KeyEvent (JavaFX 19)
Description: use: module: javafx.graphics, package: javafx.scene.input, class: KeyEvent

# Uses of Class
javafx.scene.input.KeyEvent

Packages that use KeyEvent
Package
Description
javafx.scene
Provides the core set of base classes for the JavaFX Scene Graph API.
javafx.scene.input
Provides the set of classes for mouse and keyboard input event handling.

- ## Uses of KeyEvent in javafx.scene

  Methods in javafx.scene that return types with arguments of type KeyEvent
  Modifier and Type
  Method
  Description
  `final EventHandler<? super KeyEvent>`
  Node.`getOnKeyPressed()`
  Gets the value of the property onKeyPressed.
  `final EventHandler<? super KeyEvent>`
  Scene.`getOnKeyPressed()`
  Gets the value of the property onKeyPressed.
  `final EventHandler<? super KeyEvent>`
  Node.`getOnKeyReleased()`
  Gets the value of the property onKeyReleased.
  `final EventHandler<? super KeyEvent>`
  Scene.`getOnKeyReleased()`
  Gets the value of the property onKeyReleased.
  `final EventHandler<? super KeyEvent>`
  Node.`getOnKeyTyped()`
  Gets the value of the property onKeyTyped.
  `final EventHandler<? super KeyEvent>`
  Scene.`getOnKeyTyped()`
  Gets the value of the property onKeyTyped.
  `final ObjectProperty<EventHandler<? super KeyEvent>>`
  Node.`onKeyPressedProperty()`
  Defines a function to be called when this `Node` or its child `Node` has input focus and a key has been pressed.
  `final ObjectProperty<EventHandler<? super KeyEvent>>`
  Scene.`onKeyPressedProperty()`
  Defines a function to be called when some `Node` of this `Scene` has input focus and a key has been pressed.
  `final ObjectProperty<EventHandler<? super KeyEvent>>`
  Node.`onKeyReleasedProperty()`
  Defines a function to be called when this `Node` or its child `Node` has input focus and a key has been released.
  `final ObjectProperty<EventHandler<? super KeyEvent>>`
  Scene.`onKeyReleasedProperty()`
  Defines a function to be called when some `Node` of this `Scene` has input focus and a key has been released.
  `final ObjectProperty<EventHandler<? super KeyEvent>>`
  Node.`onKeyTypedProperty()`
  Defines a function to be called when this `Node` or its child `Node` has input focus and a key has been typed.
  `final ObjectProperty<EventHandler<? super KeyEvent>>`
  Scene.`onKeyTypedProperty()`
  Defines a function to be called when some `Node` of this `Scene` has input focus and a key has been typed.
  Method parameters in javafx.scene with type arguments of type KeyEvent
  Modifier and Type
  Method
  Description
  `final void`
  Node.`setOnKeyPressed(EventHandler<? super KeyEvent> value)`
  Sets the value of the property onKeyPressed.
  `final void`
  Scene.`setOnKeyPressed(EventHandler<? super KeyEvent> value)`
  Sets the value of the property onKeyPressed.
  `final void`
  Node.`setOnKeyReleased(EventHandler<? super KeyEvent> value)`
  Sets the value of the property onKeyReleased.
  `final void`
  Scene.`setOnKeyReleased(EventHandler<? super KeyEvent> value)`
  Sets the value of the property onKeyReleased.
  `final void`
  Node.`setOnKeyTyped(EventHandler<? super KeyEvent> value)`
  Sets the value of the property onKeyTyped.
  `final void`
  Scene.`setOnKeyTyped(EventHandler<? super KeyEvent> value)`
  Sets the value of the property onKeyTyped.

- ## Uses of KeyEvent in javafx.scene.input

  Fields in javafx.scene.input with type parameters of type KeyEvent
  Modifier and Type
  Field
  Description
  `static final EventType<KeyEvent>`
  KeyEvent.`ANY`
  Common supertype for all key event types.
  `static final EventType<KeyEvent>`
  KeyEvent.`KEY_PRESSED`
  This event occurs when a key has been pressed.
  `static final EventType<KeyEvent>`
  KeyEvent.`KEY_RELEASED`
  This event occurs when a key has been released.
  `static final EventType<KeyEvent>`
  KeyEvent.`KEY_TYPED`
  This event occurs when a character-generating key was typed (pressed and released).
  Methods in javafx.scene.input that return KeyEvent
  Modifier and Type
  Method
  Description
  `KeyEvent`
  KeyEvent.`copyFor(Object newSource, EventTarget newTarget)`
  `KeyEvent`
  KeyEvent.`copyFor(Object source, EventTarget target, EventType<KeyEvent> type)`
  Creates a copy of the given event with the given fields substituted.
  Methods in javafx.scene.input that return types with arguments of type KeyEvent
  Modifier and Type
  Method
  Description
  `EventType<KeyEvent>`
  KeyEvent.`getEventType()`
  Methods in javafx.scene.input with parameters of type KeyEvent
  Modifier and Type
  Method
  Description
  `boolean`
  KeyCharacterCombination.`match(KeyEvent event)`
  Tests whether this key combination matches the key combination in the given `KeyEvent`.
  `boolean`
  KeyCodeCombination.`match(KeyEvent event)`
  Tests whether this key combination matches the key combination in the given `KeyEvent`.
  `boolean`
  KeyCombination.`match(KeyEvent event)`
  Tests whether this key combination matches the combination in the given `KeyEvent`.
  Method parameters in javafx.scene.input with type arguments of type KeyEvent
  Modifier and Type
  Method
  Description
  `KeyEvent`
  KeyEvent.`copyFor(Object source, EventTarget target, EventType<KeyEvent> type)`
  Creates a copy of the given event with the given fields substituted.
  Constructor parameters in javafx.scene.input with type arguments of type KeyEvent
  Modifier
  Constructor
  Description
  ``
  `KeyEvent(Object source, EventTarget target, EventType<KeyEvent> eventType, String character, String text, KeyCode code, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown)`
  Constructs a new `KeyEvent` 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 new `KeyEvent` event from the specified parameters, with a `null` source and target.