Directory

← Back

Shortcut

Easy keyboard shortcuts in Flow

Author

Rating

Popularity

<100

A helper for making it easier to add keyboard shortcuts to your Vaadin Flow applications.

Event scoping

The component or element you pass in works as the scope for the event. This means that the event can come from either the component itself or any of it's children.

Simple usage

Often all that is needed is mapping a key to an action.

var messageField = new TextField();
Shortcut.add(messageField, Key.ENTER, sendButton::click);

Modifier keys

You can also add modifier keys to the shortcuts. For example, submit on Shift+Enter:

var messageField = new TextField();
Shortcut.add(messageField, Key.ENTER, sendButton::click, Key.SHIFT);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Supports the new perverse List with a single item implementation of Key.

Released
2018-07-11
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 10+
Browser
N/A

Shortcut - Vaadin Add-on Directory

Easy keyboard shortcuts in Flow Shortcut - Vaadin Add-on Directory
A helper for making it easier to add keyboard shortcuts to your Vaadin Flow applications. ## Event scoping The component or element you pass in works as the scope for the event. This means that the event can come from either the component itself or any of it's children. ## Simple usage Often all that is needed is mapping a key to an action. ```java var messageField = new TextField(); Shortcut.add(messageField, Key.ENTER, sendButton::click); ``` ## Modifier keys You can also add modifier keys to the shortcuts. For example, submit on Shift+Enter: ```java var messageField = new TextField(); Shortcut.add(messageField, Key.ENTER, sendButton::click, Key.SHIFT); ```
GitHub

Shortcut version 0.2.0
Doesn't send all keys to server anymore. Uses Key from Flow instead of maintaining own list.

Shortcut version 0.2.1
Optimized network traffic

Shortcut version 0.3.0
Supports the new perverse List with a single item implementation of Key.

Online