Skip to content

ifcanduela/js-hotkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Hotkey

A simple JavaScript hotkey helper.

Attach a hotkey like this:

hotkey('input#username', 'ctrl+shift+p', function (event) {
    console.log(this.tagName); // 'INPUT'
});

If you ommit the selector, the hotkey will be attached to the <body> element:

hotkey('alt+a', function (event) {
    console.log(this.tagName); // 'BODY'
});

About

A simple JavaScript hotkey helper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published