-
Notifications
You must be signed in to change notification settings - Fork 34
Choose how you handle multiple bindings for the same shortcut #98
Description
First of all, great library! Sababa ;) ! I changed from another one I was using and I'm glad I did, so thanks for that.
So I my suggestion is that you can set the way you handle multiple bindings for the same shortcut. I basically see it as handling it in the following 3 ways when the shortcut is used:
1. Trigger all of the commands/bindings
2. Trigger the first one added
3. Trigger the last one added
Let me explain my usecase. I have a card component (kind of like a popup) that can be closed with escape. It is possible for multiple cards to be opened in a stack on top of eachother. In my usecase I would want to use option 3 because I want the last opened card to be closed with escape. Then when that is closed I want escape to close the next card and so on.
So yeah that's the suggestion, let me know what you think.
p.s. A slightly separate issue/wish I have is that the closeKey shortcut does not get "occupied" when the help menu is not open. I find it natural for it to be the escape key but I also want to use escape elsewhere in the app.
Toda raba!