mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: add focus mode keyboard shortcut (Ctrl+Shift+F)
Bind Ctrl+Shift+F to Workspace.ToggleFocusMode which previously had no default keybinding.
This commit is contained in:
18
src/platform/keybindings/defaults.test.ts
Normal file
18
src/platform/keybindings/defaults.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { CORE_KEYBINDINGS } from '@/platform/keybindings/defaults'
|
||||
|
||||
describe('CORE_KEYBINDINGS', () => {
|
||||
it('should include Workspace.ToggleFocusMode bound to Ctrl+Shift+F', () => {
|
||||
const binding = CORE_KEYBINDINGS.find(
|
||||
(kb) => kb.commandId === 'Workspace.ToggleFocusMode'
|
||||
)
|
||||
|
||||
expect(binding).toBeDefined()
|
||||
expect(binding!.combo).toEqual({
|
||||
key: 'f',
|
||||
ctrl: true,
|
||||
shift: true
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -208,5 +208,13 @@ export const CORE_KEYBINDINGS: Keybinding[] = [
|
||||
key: 'Escape'
|
||||
},
|
||||
commandId: 'Comfy.Graph.ExitSubgraph'
|
||||
},
|
||||
{
|
||||
combo: {
|
||||
key: 'f',
|
||||
ctrl: true,
|
||||
shift: true
|
||||
},
|
||||
commandId: 'Workspace.ToggleFocusMode'
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user