useHotKeys: support a hotkey that is just a modifier key like Alt #7292
p-bakker
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In out current application implemented using other technology we have a keyboard shortcut defined for just the Alt key to toggle something in the UI (between a List view and a Detail view, but that's not really relevant)
Mantine's useHotKeys doesn't seem to support that, hence this FR
Note that implementing this requires preventing conflicts with other hotkeys.
If there are for example 2 hotkeys defined, one for
alt
and one foralt+x
, it shouldn't fire the action foralt
on the keyDown event of the Alt key, but it should detect that Alt was pressed down, but that there's the potential that the user is going to press thex
next.If that happens, the call the
alt+x
actionIf the Alt key is released without the
x
key being pressed, then call thealt
actionBeta Was this translation helpful? Give feedback.
All reactions