Skip to content

[Feature Request]: temporarily disable hotkeys or context based hotkeys #1595

@trsommer

Description

@trsommer

Is there an existing issue for this?

  • 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 by Unito

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions