mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
Added ctrl+enter to queue prompt
This commit is contained in:
parent
ee46bef03a
commit
255ff2d6dd
@ -398,6 +398,15 @@ class ComfyApp {
|
|||||||
api.init();
|
api.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#addKeyboardHandler() {
|
||||||
|
window.addEventListener("keydown", (e) => {
|
||||||
|
// Queue prompt using ctrl or command + enter
|
||||||
|
if ((e.ctrlKey || e.metaKey) && (e.key === "Enter" || e.keyCode === 13 || e.keyCode === 10)) {
|
||||||
|
this.queuePrompt(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads all extensions from the API into the window
|
* Loads all extensions from the API into the window
|
||||||
*/
|
*/
|
||||||
@ -464,6 +473,7 @@ class ComfyApp {
|
|||||||
this.#addApiUpdateHandlers();
|
this.#addApiUpdateHandlers();
|
||||||
this.#addDropHandler();
|
this.#addDropHandler();
|
||||||
this.#addPasteHandler();
|
this.#addPasteHandler();
|
||||||
|
this.#addKeyboardHandler();
|
||||||
|
|
||||||
await this.#invokeExtensionsAsync("setup");
|
await this.#invokeExtensionsAsync("setup");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user