mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-18 19:57:04 +08:00
adds remaining keybinds
This commit is contained in:
parent
532a3e1e9d
commit
7b40693287
@ -12,14 +12,19 @@ app.registerExtension({
|
||||
}
|
||||
|
||||
const keyToButtonIdMap = {
|
||||
"Enter": "queue-button",
|
||||
"f": "queue-front-button",
|
||||
"q": "view-queue-button",
|
||||
"h": "view-history-button",
|
||||
"s": "save-button",
|
||||
"l": "load-button",
|
||||
"r": "refresh-button",
|
||||
"c": "clear-button",
|
||||
"d": "load-default-button"
|
||||
"d": "load-default-button",
|
||||
};
|
||||
|
||||
const buttonId = keyToButtonIdMap[event.key];
|
||||
console.log(event.key, buttonId);
|
||||
if (buttonId) {
|
||||
const button = document.querySelector(`#${buttonId}`);
|
||||
button.dispatchEvent(new Event("click"));
|
||||
|
||||
@ -448,6 +448,7 @@ export class ComfyUI {
|
||||
$el("button.comfy-settings-btn", { textContent: "⚙️", onclick: () => this.settings.show() }),
|
||||
]),
|
||||
$el("button.comfy-queue-btn", {
|
||||
id: "queue-button",
|
||||
textContent: "Queue Prompt",
|
||||
onclick: () => app.queuePrompt(0, this.batchCount),
|
||||
}),
|
||||
@ -496,9 +497,10 @@ export class ComfyUI {
|
||||
]),
|
||||
]),
|
||||
$el("div.comfy-menu-btns", [
|
||||
$el("button", { textContent: "Queue Front", onclick: () => app.queuePrompt(-1, this.batchCount) }),
|
||||
$el("button", { id: "queue-front-button", textContent: "Queue Front", onclick: () => app.queuePrompt(-1, this.batchCount) }),
|
||||
$el("button", {
|
||||
$: (b) => (this.queue.button = b),
|
||||
id: "view-queue-button",
|
||||
textContent: "View Queue",
|
||||
onclick: () => {
|
||||
this.history.hide();
|
||||
@ -507,6 +509,7 @@ export class ComfyUI {
|
||||
}),
|
||||
$el("button", {
|
||||
$: (b) => (this.history.button = b),
|
||||
id: "view-history-button",
|
||||
textContent: "View History",
|
||||
onclick: () => {
|
||||
this.queue.hide();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user