VCF Keyboard Shortcut Manager Flow
A modern library for managing keyboard shortcuts in a Vaadin application.
keyboard-shortcut-manager is A modern library for managing keyboard shortcuts in a Vaadin application.
Basic Usage
KeyboardShortcutManager keyboardShortcutManager = new KeyboardShortcutManager(this);
KeyboardShortcut[] shortcuts = new KeyboardShortcut[] {
new KeyboardShortcut("", KeyboardShortcut.Actions.helpDialog, Key.CONTROL, Key.SHIFT, Key.SLASH),
new KeyboardShortcut("", KeyboardShortcut.Actions.focusNextInvalidField, Key.ALT, Key.F8),
new KeyboardShortcut("", KeyboardShortcut.Actions.focusPreviousInvalidField, Key.ALT, Key.SHIFT, Key.F8),
new KeyboardShortcut("scope-element-1", KeyboardShortcut.Actions.clearAllFields, Key.CONTROL, Key.KEY_K),
new KeyboardShortcut("focus-element", "scope-element-2", KeyboardShortcut.Actions.focusElement, Key.CONTROL, Key.KEY_F)
};
keyboardShortcutManager.addShortcut(shortcuts);
keyboardShortcutManager.subscribe();
How to run the demo?
mvn jetty:run -pl keyboard-shortcut-manager-flow-demo
After server startup, you'll be able find the demo at http://localhost:8080
License & Author
This Add-on is distributed under Apache 2. For license terms, see LICENSE.txt.
Component Factory Keyboard Shortcut Manager is written by Vaadin Ltd.
Setting up for development:
Clone the project in GitHub (or fork it if you plan on contributing):
git clone git@github.com:vaadin-component-factory/keyboard-shortcut-manager-flow.git
To install project to your maven repository run:
mvn install
Sponsored development
Major pieces of development of this add-on has been sponsored by customers of Vaadin. Read more about Expert on Demand at: Support and Pricing
Links
Compatibility
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
- Released
- 2022-04-12
- Maturity
- STABLE
- License
- MIT License
Compatibility
- Framework
- Vaadin 14
- Vaadin 20+ in 23.1.4
- Vaadin 23+ in 23.2.0
- Vaadin 24+ in 24.0.0
- Browser
- Browser Independent
VCF Keyboard Shortcut Manager Flow - Vaadin Add-on Directory
A modern library for managing keyboard shortcuts in a Vaadin application.VCF Keyboard Shortcut Manager Flow version 1.0.0
VCF Keyboard Shortcut Manager Flow version 23.1.4
- Add platform independent modifier.
- Fix component never added to UI issue.
VCF Keyboard Shortcut Manager Flow version 23.1.5
- Fix default tab index issue for non-focusable action elements
VCF Keyboard Shortcut Manager Flow version 23.1.6
- Fix FocusNextElement action to focus not only inputs but all focusable elements in the group.
- Fix issue with multiple shortcuts on the same element trigging the element twice.
**BREAKING CHANGE**
- Change all params that accept string ids to use any CSS selector, this is for consistency and more flexibility.
VCF Keyboard Shortcut Manager Flow version 23.2.0
Attach the KSM to the UI if the current UI is present. If the bound Component is detached or attached, remove or re-add KSM respectively.
VCF Keyboard Shortcut Manager Flow version 23.2.1
- Fix clear field action
VCF Keyboard Shortcut Manager Flow version 23.3.0
- Add `export type` to fix issues with `isolatedModules: true` flag in **TypeScript / Hilla** projects.
VCF Keyboard Shortcut Manager Flow version 23.3.1
- Fix `focusNextElement`/`focusPrevElement` shortcuts bugs
VCF Keyboard Shortcut Manager Flow version 23.3.7
VCF Keyboard Shortcut Manager Flow version 23.3.8
Fixes https://github.com/vaadin-component-factory/keyboard-shortcut-manager/issues/7
VCF Keyboard Shortcut Manager Flow version 23.3.9
Fixes https://github.com/vaadin-component-factory/keyboard-shortcut-manager/issues/8 to a degree. Certain components such as MenuBar have no clear order (MenuBar's overflowing logic means ordering can't be guaranteed) so finding the first component in a section is not always perfectly doable. The workaround handles the issue by ignoring the unorderable components unless there is nothing but unorderable components in a section.
VCF Keyboard Shortcut Manager Flow version 23.3.10
Fix an undefined reference exception if no focusable elements are found.
VCF Keyboard Shortcut Manager Flow version 23.3.11
Added a new API to offer a hint for the focusNextElement / focusPreviousElement searches which may not work consistently with all components without the extra help.
VCF Keyboard Shortcut Manager Flow version 23.3.12
Fixed an issue where a group without a focusable element would cause a client-side exception
VCF Keyboard Shortcut Manager Flow version 24.0.0
Vaadin 24 version