Skip to content

Commit

Permalink
make hotkey intercompatible with both old and new UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 26, 2024
1 parent 7dc2d5b commit 973efa8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions browser_tests/interaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ test.describe('Load duplicate workflow', () => {

test.describe('Menu interactions', () => {
test('Can open settings with hotkey', async ({ comfyPage }) => {
await comfyPage.page.keyboard.down('Control')
await comfyPage.page.keyboard.down('ControlOrMeta')
await comfyPage.page.keyboard.press(',')
await comfyPage.page.keyboard.up('Control')
await comfyPage.page.keyboard.up('ControlOrMeta')
const settingsLocator = comfyPage.page.locator('.settings-container')
await expect(settingsLocator).toBeVisible()
await comfyPage.page.keyboard.press('Escape')
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/SidebarSettingsToggleIcon.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<SidebarIcon
icon="pi pi-cog"
class="settings-icon-button"
class="comfy-settings-btn"
@click="showSetting"
:tooltip="$t('settings')"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/core/keybinds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ app.registerExtension({
Backspace: '#comfy-clear-button',
d: '#comfy-load-default-button',
g: '#comfy-group-selected-nodes-button',
',': '.settings-icon-button'
',': '.comfy-settings-btn'
}

const modifierKeybindId = modifierKeyIdMap[event.key]
Expand Down

0 comments on commit 973efa8

Please sign in to comment.