Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
268a2dab
Commit
268a2dab
authored
Mar 14, 2023
by
comfyanonymous
Browse files
Merge branch 'queue-prompt-hotkey' of
https://github.com/pythongosssss/ComfyUI
parents
ff255d9d
01ec3db9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
web/scripts/app.js
web/scripts/app.js
+10
-0
No files found.
web/scripts/app.js
View file @
268a2dab
...
@@ -405,6 +405,15 @@ class ComfyApp {
...
@@ -405,6 +405,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
(
e
.
shiftKey
?
-
1
:
0
);
}
});
}
/**
/**
* Loads all extensions from the API into the window
* Loads all extensions from the API into the window
*/
*/
...
@@ -471,6 +480,7 @@ class ComfyApp {
...
@@ -471,6 +480,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
"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment