Skip to content

v1.6.0

Latest

Choose a tag to compare

@RobertWHurst RobertWHurst released this 17 Nov 09:51
34be2f0

A bigger release with a handful of fixes and one behaviour change.

Sequences are now greedy. If a key continues a sequence that's in progress, other combos completed by the same key no longer fire, and the longest sequence wins. So binding both ctrl > k, m and m will only fire the sequence when it's used.

Fixes

  • unbindKeyCombo now works when called without a handler (#62, #59)
  • Key events without a key, like those sent by browser autofill, are now ignored instead of throwing (#50)
  • Combos are now reset when the sequence timeout passes
  • Keys pressed while command is held on macOS are now released properly, so combos like meta + enter can fire again without letting go of meta (#36)
  • The Vue useKey composable now unbinds when unmounted (#68)
  • Events from the test instance now include preventDefault (#31)

Additions

  • useKey and useKeyCombo can now call preventDefault for you (#48)
  • A global build for script tags, and fixed CDN examples in the readme (#51)
  • A readme note on holding several keys at once, for things like games (#43)

Special thanks to @julia-and for the preventDefault option, @buhodev for the Vue unbind fix, @MichaelBuessemeyer for raising the overlapping sequence issue and tracking down the autofill bug, and @thiemok for pinpointing the unbindKeyCombo issue.