2brownc / useHydra

A component that chains keystrokes. So instead of `C-c C-v`, `C-c-v` can be keyed in.

Home Page:https://2brownc.github.io/useHydra/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useHydra

A component that chains keystrokes. So instead of C-c C-v, C-c-v can be keyed in.

  • useHydra() helps with reacting to keystrokes from the user. It can chain keystrokes.
  • Keys pressed inside a set interval, gapTolerance, can be chained.
  • A key pressed after the interval will start a new chain.
  • Usage: const [currentKeyCombo, updateGapTolerance] = useHydra(defaultGapTolerance)
  • currentKeyCombo is an array containing the current keystrokes of the user.
  • updateGapTolerance, in milliseconds, is used to chain key pressed inside of an interval. Default is 1000ms.

See It In Video

useHydra.In.Action.mp4

Try It Out Yourself

Click here to try our the custom hook yourself!

About

A component that chains keystrokes. So instead of `C-c C-v`, `C-c-v` can be keyed in.

https://2brownc.github.io/useHydra/


Languages

Language:JavaScript 67.5%Language:HTML 21.1%Language:CSS 11.4%