ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Add keybind to cancel current generation

Open tomhallmain opened this issue 1 year ago • 4 comments

Added a way to cancel the current run without touching the mouse while the queue is open in the UI, so a generation can be started then canceled using the keyboard only.

I am not preferential to the key used -- I chose K because it's like C and didn't want to use Ctrl+C. Perhaps a different key would be less invasive depending on the browser.

tomhallmain avatar Dec 09 '23 03:12 tomhallmain

A shortcut to cancel all queued items, in addition to canceling what is currently running, is also needed.

ltdrdata avatar Dec 09 '23 06:12 ltdrdata

Ctrl+K in Firefox takes you to the address bar; this is not a good shortcut combination to use for that purpose.

soulctcher avatar Dec 26 '23 00:12 soulctcher

Ctrl-k is also the emacs (and therefore muscle memory for a lot of people) cut to end of line key. I can imagine myself using that by accident whilst editing a prompt. How about something like Ctrl-Backspace? It feels like a reasonable mirror to Ctrl-Enter submit an item.

WeeBull avatar Dec 27 '23 14:12 WeeBull

@ltdrdata @soulctcher @WeeBull thanks for the recommendations, this was just a quick and dirty fix I wanted to share initially. Looks like @Immac 's PR may be taken which may meet your wishes. Wish I had noticed that before working on this earlier today 🙄 but glad to see it may be added to core soon.

tomhallmain avatar Dec 29 '23 21:12 tomhallmain

Can we get a shortcut for this, please?

amarillosebas avatar Mar 11 '24 21:03 amarillosebas

Any progress on this?

EvgeneKuklin avatar Mar 19 '24 09:03 EvgeneKuklin

@amarillosebas @EvgeneKuklin I haven't heard anything from the code owner on this, so I've been keeping it as untracked changes on my local copy. The key bindings I switched to are in Immac's linked PR and I will also update them in my original comment. I would recommend using Immac's version as it adds some other bindings as well.

tomhallmain avatar Mar 21 '24 23:03 tomhallmain