keyboard-shortcuts

0.2.0 • Public • Published

keyboard-shortcuts

npm David David

Keyboard shortcuts

import Keys, { getKeyCombo } from 'keyboard-shortcuts';
 
const key = Keys.c; // Symbol(c)
Keys[key]; // 'c'
 
const event = {
  altKey: false
  charCode: 99
  ctrlKey: false
  keyCode: 99
  keyIdentifier: "U+0043"
  metaKey: false
  shiftKey: false
  timeStamp: 1440844681923
  type: "keypress"
  which: 99
};
getKeyCombo(event); // Symbol(c)

Readme

Keywords

none

Package Sidebar

Install

npm i keyboard-shortcuts

Weekly Downloads

5

Version

0.2.0

License

MIT

Last publish

Collaborators

  • thomwright