0.1.1 • Published 7 years ago

keychord v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

keychord

Browser key event matching helpers

usage

// create matcher functions
var leftKey    = keychord('left')
var ctrlA      = keychord('ctrl-a')
var ctrlShiftA = keychord('ctrl-shift-a')

document.addEventListener('keydown', function(event) {
  if (leftKey(event)) {
    console.log('left')
  } else if (ctrlA(event)) {
    console.log('ctrl-a')
  } else if (ctrlShiftA(event)) {
    console.log('ctrl-shift-a')
  }
})
0.1.1

7 years ago

0.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago