Skip to main content
The Commands and Keybindings API allows extensions to register custom commands and associate them with keyboard shortcuts. This enables users to quickly trigger actions without using the mouse.

Basic Usage

Command Configuration

Each command requires an id, label, and function:

Keybinding Configuration

Each keybinding requires a combo and commandId:

Special Keys

For non-character keys, use one of these values:
  • Arrow keys: "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"
  • Function keys: "F1" through "F12"
  • Other special keys: "Escape", "Tab", "Enter", "Backspace", "Delete", "Home", "End", "PageUp", "PageDown"

Command Examples

Keybinding Examples

Notes and Limitations

  • Keybindings defined in the ComfyUI core cannot be overwritten by extensions. Check the core keybindings in these source files:
  • Some key combinations are reserved by the browser (like Ctrl+F for search) and cannot be overridden
  • If multiple extensions register the same keybinding, the behavior is undefined