Allow to control when keyboard shortcuts are active. #819
Labels
needs triage
requires further investigation before proceeding with implementation
react
Issue related to React
Is your feature request related to a problem? Please describe.
I want to have keyboard shortcuts to do many things in my application. Some of these things require the focus to be on certain elements. Example : Delete key shortcut to delete selected elements.
The problem is that keyboard shortcuts are not executed because, when elements are selected, the boolean flag 'isFocusOnHome' is false.
The thing is that most shortcuts must require some kind of context to perform an action. "Ex: having a tool active, having some element selected, etc...".
The 'focus on home' check prevents shortcuts from being used.
It's also counter intuitive mixed with the
isActive
boolean flag.So, instead of a boolean flags like
isFocusOnHomeRequired
andisActive
, I suggest we put a predicate function so the user can control when the shortcut is active. The predicate could default to the usualisFocusOnHome
check.Describe the Solution you'd like
Letting the user decide when a keyboard shortcut is active.
Describe alternatives you've considered
See discussion : #804
Additional context
No response
The text was updated successfully, but these errors were encountered: