0.1.1 • Published 8 years ago

keychord v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 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

8 years ago

0.1.0

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago