Skip to content

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

Notifications You must be signed in to change notification settings

2brownc/useHydra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published