Skip to content

jacwright/shortcut-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shortcut-string

This module returns the textual representation of a shortcut given a keyboard event. Examples of shortcuts:

  • Cmd+L
  • Cmd+Shift+M
  • Ctrl+O
  • Backspace
  • T
  • Right
  • Shift+Down
  • Shift+F1
  • Ctrl++
  • Ctrl+Left
var shortcutString = require('shortcut-string');

document.addEventListener('keydown', function(event) {
  console.log(shortcutString.fromEvent(event));
});

About

Returns the shortcut string representation of a keyboard event (e.g. Cmd+Shift+F1)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published