1.1.0 • Published 2 years ago

is-key-combo v1.1.0

Weekly downloads
201
License
MIT
Repository
github
Last release
2 years ago

is-key-combo

Greenkeeper badge

Do assertions on given key combos and events and returns true if match

Install

npm install is-key-combo

Usage

const isKeyCombo = require('is-key-combo');
const isValid = isKeyCombo(event, 'cmd+a');

Some sample combinations

  • cmd+a
  • cmd+shift+esc
  • alt+enter

Note that cmd applies both for Ctrl and ⌘ so it will be easier to handle combinations cross platform.

License

MIT

1.1.0

2 years ago

1.0.4

6 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago