-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
import * as React from 'react';
import { useComboKeys } from 'react-combo-keys';
function SearchBar(props: {}) {
const input = Rwact.useRef();
useComboKeys({
- 'Mod+F': () => {
+ 'mod+f': () => {
input.current.focus();
},
- 'Mod+': () => {
+ 'mod+s': () => {
alert('Settings !')
}
- }, {}, []);
+ }, []);
return <input type="text" ref={input} />;
}
BTW
First of all, thank you for this very usefully library.
Is it possible to add an option for disable or enable shortcut by some conditional?
Metadata
Metadata
Assignees
Labels
No labels