shortcut-string

1.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i shortcut-string

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

2.63 kB

Total Files

4

Last publish

Collaborators

  • jacwright