Right Click Drag should be Selection Box (CTRL and Left Click Drag)
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Feature Idea
Right now, on the legacy controls, Right click drag does nothing. It would be beneficial to have it replicate the behavior of holding down CTRL and left click dragging to make a selection box.
Now, we don't need our left hand to select multiple nodes. This is common practice in some audio Digital Audio Workstations like Cockos REAPER. I thought it'd be natural and useful here. I'm current using an AHK script to do it but it would be nice if it was native.
### Existing Solutions
AHK script for Brave browser made with Claude.
```
; ComfyUI Right-Click Drag Selection Script - Debug Version
; This script converts right-click drag to Ctrl+Left-click drag for selection boxes
#NoEnv
#SingleInstance Force
#Persistent
; Variables to track drag state
RightClickDragging := false
RightClickHeld := false
HoldStartTime := 0
HoldDuration := 300 ; Hold time in milliseconds before activating selection
; Debug hotkey to check current window info - changed from F1 to avoid Brave conflict
F2::
WinGetTitle, Title, A
WinGetClass, Class, A
WinGet, ProcessName, ProcessName, A
MsgBox, 0, Window Info, Title: %Title%`nClass: %Class%`nProcess: %ProcessName%
return
; Multiple window matching attempts - only ONE will be active at a time
; Comment/uncomment the ones you want to try
; Option 1: Brave browser (try this first)
#IfWinActive, ahk_exe brave.exe
; Option 2: Chrome-based browser class (uncomment to try)
; #IfWinActive, ahk_class Chrome_WidgetWin_1
; Option 3: Specific Chrome executable (uncomment to try)
; #IfWinActive, ahk_exe chrome.exe
; Option 4: Edge browser (uncomment to try)
; #IfWinActive, ahk_exe msedge.exe
; Option 5: Any browser with ComfyUI in title (uncomment to try)
; #IfWinActive, ComfyUI
; Option 6: Any active window (for testing - uncomment to try)
; #IfWinActive
; Right mouse button down
RButton::
; Record the time when right button was pressed
HoldStartTime := A_TickCount
RightClickHeld := true
RightClickDragging := false
; Start monitoring for hold duration
SetTimer, CheckRightHold, 10
return
; Right mouse button up
RButton Up::
SetTimer, CheckRightHold, Off
RightClickHeld := false
if (RightClickDragging) {
; Release Ctrl and Left click
Send, {Ctrl up}{LButton up}
RightClickDragging := false
} else {
; If it wasn't converted to selection, send normal right-click
Send, {RButton}
}
return
; Timer function to check for hold duration
CheckRightHold:
if (!RightClickHeld) {
SetTimer, CheckRightHold, Off
return
}
CurrentTime := A_TickCount
HeldTime := CurrentTime - HoldStartTime
; If held long enough and not already dragging
if (HeldTime >= HoldDuration && !RightClickDragging) {
RightClickDragging := true
; Start Ctrl+Left click drag (suppress the original right-click)
Send, {Ctrl down}{LButton down}
; ToolTip, Selection mode activated ; Debug
}
return
; Toggle script on/off
F12::
Suspend, Toggle
if (A_IsSuspended) {
ToolTip, ComfyUI Script SUSPENDED
SetTimer, ClearTooltip, 2000
} else {
ToolTip, ComfyUI Script ACTIVE
SetTimer, ClearTooltip, 2000
}
return
ClearTooltip:
ToolTip
SetTimer, ClearTooltip, Off
return
; Exit hotkey
^!q::ExitApp ; Ctrl+Alt+Q to exit the script
#IfWinActive ; Reset window context
``
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.