Class KeyboardEventTrigger.EventData

java.lang.Object
com.vaadin.flow.component.trigger.internal.KeyboardEventTrigger.EventData
All Implemented Interfaces:
Serializable
Enclosing class:
KeyboardEventTrigger

public abstract static class KeyboardEventTrigger.EventData extends Object implements Serializable
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 Details

    • key

      public static final Action.Input<String> key
      event.key — the value of the key pressed, accounting for the keyboard layout and modifiers (e.g. "a", "A", "ArrowUp", "Enter").
    • code

      public static final Action.Input<String> code
      event.code — the physical key on the keyboard, independent of layout or modifiers (e.g. "KeyA", "ArrowUp", "Enter").
    • repeat

      public static final Action.Input<Boolean> repeat
      event.repeattrue when the event is fired by the OS auto-repeat while the key is held down.
    • isComposing

      public static final Action.Input<Boolean> isComposing
      event.isComposingtrue while the event is part of an IME composition session (between compositionstart and compositionend).
    • shiftKey

      public static final Action.Input<Boolean> shiftKey
      event.shiftKey — whether shift was held during the event.
    • ctrlKey

      public static final Action.Input<Boolean> ctrlKey
      event.ctrlKey — whether ctrl was held during the event.
    • altKey

      public static final Action.Input<Boolean> altKey
      event.altKey — whether alt was held during the event.
    • metaKey

      public static final Action.Input<Boolean> metaKey
      event.metaKey — whether meta was held during the event.
  • Constructor Details

    • EventData

      protected EventData()
      The class exists purely as a namespace for the static Action.Input fields.