Closed
Description
Is your feature request related to a problem? Please describe.
It's currently impossible to update the value of the keys while recording a shortcut.
Describe the solution you'd like
The useRecordHotkeys
could also return a setKeys
function which we could use to programatically change the value of the keys.
const [keys, { setKeys }] = useRecordHotkeys();
const onChangeKeys = () => {
setKeys(new Set(['ctrl']));
};
Describe alternatives you've considered
I've resorted to mutating the Set
of keys, which is a bad practice in React.
Additional context
Add any other context or screenshots about the feature request here.
Metadata
Metadata
Assignees
Labels
No labels