mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 08:00:05 +00:00
Add spellcheck option to Multiline widget, add Interrupt Queue keybind (#267)
* Add spellcheck option to Multiline widget and set to false by default * Add Queue Interrupt Keybind * Update keybinds.ts Fixed indentation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { app } from '../../scripts/app'
|
||||
import { api } from '../../scripts/api'
|
||||
|
||||
app.registerExtension({
|
||||
name: 'Comfy.Keybinds',
|
||||
@@ -6,8 +7,14 @@ app.registerExtension({
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user