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
I have searched the existing issues and checked the recent builds/commits
What would your feature do ?
A developer api to temporarily disable hotkeys.
When a user opens the Mask Editor and presses Ctrl+Z, the undo operation should affect the Mask Editor rather than triggering ComfyUI's global undo functionality.
A better alternative would be a developer API to create hotkeys that only affect a certain context. Context could be enabled and disabled.
We definitely need #1230 as it unifies the keyboard listener. However, it doesn't resolve the issue where all canvas keybindings can still be triggered from the mask editor (e.g. Ctrl + O). The new keyboard shortcut system managing undo and redo actions doesn't address that problem (at least I don't see how it does). They behave like all other keybindings now.
In my opinion, in the short term, the best solution is to disable certain hotkeys from triggering using a command or through app.registerExtension. In the long term, the ideal solution would be to define different hotkey contexts (e.g., one for the canvas, another for the mask editor, and possibly others). Each context would handle keybindings separately, ensuring that hotkeys do not trigger in the wrong context and allowing for double definitions of hotkeys. Users will likely want to change the mask editor keybindings as well, so there needs to be a way to do that in the settings.
Is there an existing issue for this?
What would your feature do ?
A developer api to temporarily disable hotkeys.
When a user opens the Mask Editor and presses Ctrl+Z, the undo operation should affect the Mask Editor rather than triggering ComfyUI's global undo functionality.
A better alternative would be a developer API to create hotkeys that only affect a certain context. Context could be enabled and disabled.
Proposed workflow
// Usage example 1
app.extensionManager.disableKeybindings('commandId1');
app.extensionManager.enableKeybindings(['commandId1', 'commandId2']);
//Usage example 2
//create context and keybinding via app.registerExtension
app.extensionManager.enableHotkeyContext('contextId')
app.extensionManager.disableHotkeyContext('contextId')
Additional information
No response
┆Issue is synchronized with this Notion page by Unito
The text was updated successfully, but these errors were encountered: