Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it support duplicate keybinds? #10

Open
mjcampagna opened this issue Jun 29, 2023 · 1 comment
Open

Does it support duplicate keybinds? #10

mjcampagna opened this issue Jun 29, 2023 · 1 comment

Comments

@mjcampagna
Copy link

mjcampagna commented Jun 29, 2023

For example, say that ESC can be used to close an open drawer. And then ESC is also used to close an open modal.

If I have an open drawer beneath an open modal, my desired behavior would be:

  • pressing ESC once closes the modal
  • pressing ESC again then closes the open drawer

Is this type of behavior supported, allowing duplicate keybinds to be registered sequentially and contextually?

@hb1998
Copy link

hb1998 commented Jul 19, 2023

either you'll have to create different providers , In your case one for Modal and one for drawer. or you can modify the handler in such a way that it triggers modal close, if modal is open or drawer close if drawer is open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants