🗺️🌐 useKeyPress
This hook is for handling keyboard events. Easily capture actions like pressing CMD+K. Perfect for enhancing interactivity in your React apps!
Test this by pressing
⌘
+
K
On a mobile device - Swipe Up with 2 fingers.
This is done with the useGesture hook
Use it like this:
useKeyPress({
keyPressItems: [
{
keys: ["Meta", "KeyK"],
event: (e) => showCommand(),
},
],
});
View on Github