Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/extensions/core/keybinds.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { app } from '../../scripts/app'
import { api } from '../../scripts/api'

app.registerExtension({
name: 'Comfy.Keybinds',
init() {
const keybindListener = function (event) {
const modifierPressed = event.ctrlKey || event.metaKey

// Queue prompt using ctrl or command + enter
// Queue prompt using (ctrl or command) + enter
if (modifierPressed && event.key === 'Enter') {
// Cancel current prompt using (ctrl or command) + alt + enter
if(event.altKey) {
api.interrupt()
return
}
// Queue prompt as first for generation using (ctrl or command) + shift + enter
app.queuePrompt(event.shiftKey ? -1 : 0).then()
return
}
Expand Down
1 change: 1 addition & 0 deletions src/scripts/widgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ function addMultilineWidget(node, name, opts, app) {
inputEl.className = 'comfy-multiline-input'
inputEl.value = opts.defaultVal
inputEl.placeholder = opts.placeholder || name
inputEl.spellcheck = opts.spellcheck || false

const widget = node.addDOMWidget(name, 'customtext', inputEl, {
getValue() {
Expand Down