Class KeyboardEventTrigger.EventData
java.lang.Object
com.vaadin.flow.component.trigger.internal.KeyboardEventTrigger.EventData
- All Implemented Interfaces:
Serializable
- Enclosing class:
KeyboardEventTrigger
The
KeyboardEvent properties exposed as static
Action.Input sources. Use these as the value source of an
Action wired to any KeyboardEventTrigger (or subclass).
Each field is bound to KeyboardEventTrigger; using it in the
handler of an unrelated trigger throws IllegalArgumentException
at Trigger.triggers(Action...) time.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Action.Input<Boolean> event.altKey— whether alt was held during the event.static final Action.Input<String> event.code— the physical key on the keyboard, independent of layout or modifiers (e.g.static final Action.Input<Boolean> event.ctrlKey— whether ctrl was held during the event.static final Action.Input<Boolean> event.isComposing—truewhile the event is part of an IME composition session (betweencompositionstartandcompositionend).static final Action.Input<String> event.key— the value of the key pressed, accounting for the keyboard layout and modifiers (e.g.static final Action.Input<Boolean> event.metaKey— whether meta was held during the event.static final Action.Input<Boolean> event.repeat—truewhen the event is fired by the OS auto-repeat while the key is held down.static final Action.Input<Boolean> event.shiftKey— whether shift was held during the event. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedThe class exists purely as a namespace for the staticAction.Inputfields. -
Method Summary
-
Field Details
-
key
event.key— the value of the key pressed, accounting for the keyboard layout and modifiers (e.g."a","A","ArrowUp","Enter"). -
code
event.code— the physical key on the keyboard, independent of layout or modifiers (e.g."KeyA","ArrowUp","Enter"). -
repeat
event.repeat—truewhen the event is fired by the OS auto-repeat while the key is held down. -
isComposing
event.isComposing—truewhile the event is part of an IME composition session (betweencompositionstartandcompositionend). -
shiftKey
event.shiftKey— whether shift was held during the event. -
ctrlKey
event.ctrlKey— whether ctrl was held during the event. -
altKey
event.altKey— whether alt was held during the event. -
metaKey
event.metaKey— whether meta was held during the event.
-
-
Constructor Details
-
EventData
protected EventData()The class exists purely as a namespace for the staticAction.Inputfields.
-