Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

pipan/js-keyboard-shortcuts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keyboadr Shortcuts Module

Add keyboard shortcuts to your application

Installation

npm install --save @wildebeest/keyboard-shortcuts

Requirements

It's usefull to know these libraries:

  • inversify
  • @wildebeest/js-modules

Usage

Create Application

let app: Application();
app.run([KeyboardShortcutsModule]);

Name your shortcut

let keyboardShortcutsService = app.getContainer().get(KeyboardShortcutsService);
keyboardShortcutsService.nameShortcuts("open file", "ctrl+o");

Listen for a shortcut to be pressed

keyboardShortcutsService.on("open file", (event: any) => {
    // do something
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published