Comfy-Org / Comfy-Org/ComfyUI_frontend
[Feature Request]: temporarily disable hotkeys or context based hotkeys
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Is there an existing issue for this?
- [X] 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.
### 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](https://www.notion.so/Issue-1595-Feature-Request-temporarily-disable-hotkeys-or-context-based-hotkeys-15f6d73d36508139a6b4d3bc724a66f8) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.