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
Currently, the only way to change the global hotkey listener added to the PlayControlNode is to remove it entirely with includeGlobalHotKey, a boolean option that prevents the listener from being added.
It would be much better if we could customize the hotkeys that fire the global key listener. This should be a general design pattern for hot keys in common code. It is OK for there to be a default hot key, but it should be customizable.
Relevant Slack conversation:
Putting the hot key in PlayControlButton is problematic. What if I have 2 play/pause buttons on a screen, for controlling different things? PlayControlButton has options.includeGlobalHotKey only, so you’re out of luck.
Jesse Greenberg 2:36 PM
Wouldn't that option cover it? If you had two you would probably want to disable the hotkey.
Chris Malley 2:37 PM
Not at all. PlayControlButton is a reusable UI component, designed to be used in many contexts. Assuming that there is only 1 hot key is also assuming that there is only 1 context.
2:38
It’s OK for reusable UI components to have default hot keys. But they should not be limited to only 1 hot key.
Jesse Greenberg 2:40 PM
OK, gotchya. We can make the hotkeys for that listener customizable.
Chris Malley 2:40 PM
That should be the general pattern for anything in common code.
The text was updated successfully, but these errors were encountered:
Currently, the only way to change the global hotkey listener added to the PlayControlNode is to remove it entirely with
includeGlobalHotKey
, a boolean option that prevents the listener from being added.It would be much better if we could customize the hotkeys that fire the global key listener. This should be a general design pattern for hot keys in common code. It is OK for there to be a default hot key, but it should be customizable.
Relevant Slack conversation:
The text was updated successfully, but these errors were encountered: