-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Labels
Version 5.xThese tickets will be solved in Version 5.xThese tickets will be solved in Version 5.xenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Hi! Just migrated from v3 to v4 and noticed that our returned keys
doesn't include modifiers?
Previously we did these ones.
const HOTKEYS = [
{
keys: 'ctrl+alt+s',
type: 'save',
},
{
keys: 'ctrl+alt+f',
type: 'find',
},
]
useHotkeys(
HOTKEYS.map(hotkey => hotkey.keys).join(','),
(_, { key }) =>
setActive(HOTKEYS.find(({ keys }) => keys === key)?.type || null)
)
Which was pretty straight forward but now we've needed to put in some extra smarts to match the callbacks. Is not including the modifiers the expected behavior?
PS Great work on the library!
nosykretts
Metadata
Metadata
Assignees
Labels
Version 5.xThese tickets will be solved in Version 5.xThese tickets will be solved in Version 5.xenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers