Package com.vaadin.flow.component
Interface ShortcutRegistration.ShortcutJs
- All Superinterfaces:
Serializable
- Enclosing class:
ShortcutRegistration
The keydown delegate of a keyboard shortcut, as a JavaScript definition
for
Element.executeJs(Class). The function it calls is installed
by the shortcut helper that the client bundle carries.
For internal use only. May be renamed or removed in a future release.
- Since:
- 25.4
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidregisterKeydownDelegate(JsFunction locateDelegate, String requiredModifiers, String forbiddenModifiers, boolean checkBoundary, boolean resetFocus, boolean allowDefault, String... keys) Relays the keydown events of an element that only exists in the browser to the element this definition was obtained from, the listen-on component of a shortcut.
-
Method Details
-
registerKeydownDelegate
@JsExpression("window.Vaadin.Flow.shortcut.registerKeydownDelegate(this, $0, {\n keys: $6,\n requiredModifiers: $1,\n forbiddenModifiers: $2,\n checkBoundary: $3,\n resetFocus: $4,\n allowDefault: $5\n});") void registerKeydownDelegate(JsFunction locateDelegate, String requiredModifiers, String forbiddenModifiers, boolean checkBoundary, boolean resetFocus, boolean allowDefault, String... keys) Relays the keydown events of an element that only exists in the browser to the element this definition was obtained from, the listen-on component of a shortcut. A keydown that matches the given key and modifiers is re-dispatched to the listen-on element, and its propagation is stopped.- Parameters:
locateDelegate- the function that returns the element to listen on, called with the listen-on element asthis, seeShortcuts.setShortcutListenOnElementLocator(JsFunction, Component)requiredModifiers- the names of the modifiers that have to be pressed, separated by spacesforbiddenModifiers- the names of the modifiers that must not be pressed, separated by spacescheckBoundary- whether to ignore a keydown from an open popover or modal inside the element to listen onresetFocus- whether to reset the focus of the active element before the keydown is relayedallowDefault- whether to allow the default behavior of a matching keydownkeys- the key codes and key values that the keydown matches
-