Skip to content

nescalante/is-key-combo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

checks if event is key combo

Resources

License

Stars

Watchers

Forks

Packages

No packages published