mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: make key presses visible in video — hold + subtitle
pressKey now uses keyboard.down/up with 400ms hold instead of instant press(). Shows subtitle "⌨ Escape" and the keyboard HUD catches the held state for video frame capture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -762,7 +762,17 @@ export async function executeAction(
|
||||
break
|
||||
case 'pressKey':
|
||||
try {
|
||||
await page.keyboard.press(step.key)
|
||||
// Show key press in subtitle + hold long enough for video frame capture
|
||||
const keyLabel =
|
||||
step.key === ' '
|
||||
? 'Space'
|
||||
: step.key.length === 1
|
||||
? step.key.toUpperCase()
|
||||
: step.key
|
||||
await showSubtitle(page, `⌨ ${keyLabel}`, 0)
|
||||
await page.keyboard.down(step.key)
|
||||
await sleep(400) // Hold long enough for HUD + video frame
|
||||
await page.keyboard.up(step.key)
|
||||
await sleep(300)
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
|
||||
Reference in New Issue
Block a user