Socket
Socket
Sign inDemoInstall

@vaadin-component-factory/keyboard-shortcut-manager

Package Overview
Dependencies
28
Maintainers
10
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vaadin-component-factory/keyboard-shortcut-manager

[![npm version](https://badgen.net/npm/v/@vaadin-component-factory/keyboard-shortcut-manager)](https://www.npmjs.com/package/@vaadin-component-factory/keyboard-shortcut-manager) [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Direc


Version published
Weekly downloads
38
decreased by-48.65%
Maintainers
10
Created
Weekly downloads
 

Readme

Source

VCF Keyboard Shortcut Manager

npm version Published on Vaadin Directory

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.

DEMO ↗

API ↗

Install

npm i @vaadin-component-factory/keyboard-shortcut-manager

Usage

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();

Keybinding Syntax

Refer to the following links for more information on the keybinding syntax:

Publish the component to NPM

npm login

git commit -a -m "v${version}"
npm version ${version}
npm publish --registry https://registry.npmjs.org/
git reset HEAD~2
git commit -a -m "v${version}"
git push
git push origin v${version}

License

Apache-2.0 License

Keywords

FAQs

Last updated on 11 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc