You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a document to keep track of breaking changes from version 4 to 5.
General
The library will only listen to the code, not to the produced key.
After looking in the implementation of a few other libraries I came to the conclusion that listening to the produced key doesn't make a lot of sense. There are way too many layouts to handle the produced key in a useful way. This will be quite a breaking change, but I feel that this is necessary in order to clean up the mess that version 4 introduced.
HotkeysProvider
useHotkeysContext -> enabledScopes is renamed to activeScopes since it's too close to enableScope
Disabling all scopes will now result in having no scopes active, not even the wildcard.
useHotkeys
Can take an array of keys and handlers, to mitigate having to use the hook multiple times in the same place.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a document to keep track of breaking changes from version 4 to 5.
General
The library will only listen to the code, not to the produced key.
After looking in the implementation of a few other libraries I came to the conclusion that listening to the produced key doesn't make a lot of sense. There are way too many layouts to handle the produced key in a useful way. This will be quite a breaking change, but I feel that this is necessary in order to clean up the mess that version 4 introduced.
HotkeysProvider
enabledScopes
is renamed toactiveScopes
since it's too close toenableScope
useHotkeys
Beta Was this translation helpful? Give feedback.
All reactions