From cb4c2bb1302916cbd12627076e336ff0c4bbba5e Mon Sep 17 00:00:00 2001 From: Muerrilla <48160881+muerrilla@users.noreply.github.com> Date: Tue, 21 Jul 2026 23:01:37 +0330 Subject: [PATCH] Update README.md --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08837ab..ccb4c72 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,29 @@ -# ComfyUI-Tab-Cycle -Extension for ComfyUI that enables cycling through the number inputs on a node using Tab / Shift+Tab +# ComfyUI Tab Cycle + +Cycle through the number input fields on a node using Tab / Shift+Tab, as you would in your favorite software! + +ComfyUI doesn't do this out of the box, so here we are. + +## How to use + +Click a number/slider input widget on a node, edit the value, hit Tab to apply and go to the the next input. + +Shift+Tab goes backwards. If no number input field is active pressing Tab has the default behavior. + +No more click, type, hit Enter to apply, click the next one, repeat! + + +## What it doesn't do + +- **Text/Boolean/Dropdown/etc. widgets are out of scope** by design. The purpose is quick editing of numbers. +- **No cross-node tabbing.** Tab only cycles within whichever node you clicked into. Wraps around at the end. + +## Install + +Drop this folder into `custom_nodes/`, restart ComfyUI, hard-refresh your browser. (Or install via ComfyUI-Manager once it's up on the registry.) + +## How it works (for the curious) + +litegraph's own widget-click handling doesn't route through anything node-level we can hook cleanly. Tried `node.onMouseDown` first, nope, widget clicks bypass it entirely. So instead: a `pointerdown` listener on the canvas does its own hit-test: screen coords → graph coords using the canvas pan/zoom transform, then which node's bounding box contains the click, then which widget row via `widget.last_y` (which litegraph sets during its own render pass, more reliable than guessing row-height constants). From there Tab just drives litegraph's built-in `canvas.prompt()` for each widget in sequence and fires a synthetic Enter to commit-and-close before opening the next one. + +None of this is public API. It's reaching into litegraph/ComfyUI internals that could shift under a frontend update. Works today; no promises about tomorrow. If Tab stops doing anything after a ComfyUI update, that's probably why. Open an issue and I'll take a look.