mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 01:20:09 +00:00
add a hotkey for settings (#991)
* add a hotkey for settings for #942 * playwright test for settings menu hotkey * make hotkey intercompatible with both old and new UI
This commit is contained in:
committed by
GitHub
parent
05f999903d
commit
81119acaf2
@@ -422,3 +422,15 @@ test.describe('Load duplicate workflow', () => {
|
||||
expect(await comfyPage.getGraphNodesCount()).toBe(1)
|
||||
})
|
||||
})
|
||||
|
||||
test.describe('Menu interactions', () => {
|
||||
test('Can open settings with hotkey', async ({ comfyPage }) => {
|
||||
await comfyPage.page.keyboard.down('ControlOrMeta')
|
||||
await comfyPage.page.keyboard.press(',')
|
||||
await comfyPage.page.keyboard.up('ControlOrMeta')
|
||||
const settingsLocator = comfyPage.page.locator('.settings-container')
|
||||
await expect(settingsLocator).toBeVisible()
|
||||
await comfyPage.page.keyboard.press('Escape')
|
||||
await expect(settingsLocator).not.toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<SidebarIcon
|
||||
icon="pi pi-cog"
|
||||
class="comfy-settings-btn"
|
||||
@click="showSetting"
|
||||
:tooltip="$t('settings')"
|
||||
/>
|
||||
|
||||
@@ -41,7 +41,8 @@ app.registerExtension({
|
||||
o: '#comfy-file-input',
|
||||
Backspace: '#comfy-clear-button',
|
||||
d: '#comfy-load-default-button',
|
||||
g: '#comfy-group-selected-nodes-button'
|
||||
g: '#comfy-group-selected-nodes-button',
|
||||
',': '.comfy-settings-btn'
|
||||
}
|
||||
|
||||
const modifierKeybindId = modifierKeyIdMap[event.key]
|
||||
|
||||
Reference in New Issue
Block a user