keyboard-shortcut-manager
/
1.0.7-legacy-1
keyboard-shortcut-manager 1.0.7-legacy-1
Install from the command line:
Learn more about npm packages
$ npm install @vaadin-component-factory/keyboard-shortcut-manager@1.0.7-legacy-1
Install via package.json:
"@vaadin-component-factory/keyboard-shortcut-manager": "1.0.7-legacy-1"
About this version
A modern library for managing keyboard shortcuts in a Vaadin application (or any framework).
- Dispatch custom events from keyboard shortcuts.
- Bind multiple keyboard commands to a single event listener.
- Easily create simple keyboard shortcut help dialog/popup.
- Compatible with web components and Shadow DOM.
- Implemented in TypeScript.
This is a wrapper for the Tinykeys library.
npm i @vaadin-component-factory/keyboard-chortcut-manager
Create an array of KeyboardShortcut
definitions:
const shortcuts: KeyboardShortcut = [
{
keyBinding: 'Control+Shift+?',
handler: 'help-dialog',
description: 'Opens the help dialog.'
}
];
Then create a KeyboardShortcutManager
instance and subscribe
your shortcuts to activate them:
const ksm = new KeyboardShortcutManager({ shortcuts, helpDialog: true });
ksm.subscribe();
Refer to the following links for more information on the keybinding syntax:
Apache-2.0 License
Details
- keyboard-shortcut-manager
- vaadin-component-factory
- over 2 years ago
- MIT
- 47 dependencies
Assets
- keyboard-shortcut-manager-1.0.7-legacy-1-npm.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0