feat: add keyboard shortcut to move selected nodes (unbound by default)#4066
Conversation
closes Comfy-Org#1265 Unit tests included. Please note that I had to add some `void` operators to unrelated code in order for Husky to accept my commit; this should not have any functional change. Ensure `moveSelectedNodesVersionAdded` is correct before merging this commit's associated PR.
src/composables/useCoreCommands.ts
Outdated
| import { useSearchBoxStore } from '@/stores/workspace/searchBoxStore' | ||
| import { useWorkspaceStore } from '@/stores/workspaceStore' | ||
|
|
||
| const moveSelectedNodesVersionAdded = '1.22.1' |
There was a problem hiding this comment.
Ensure this value is not stale when merging this PR.
|
What about not setting them as keybinding and just registering the commands. Then people can set the keybinds themselves if they'd like? Otherwise the experience might be too jarring to start happening suddenly. WDYT? |
webfiltered
left a comment
There was a problem hiding this comment.
Hi, looks good. I agree w/ @christian-byrne - we should not add default key bindings for this feature.
|
Wait, apologies, I think I need to fix the tests after removing the default keybinds. |
Let user set their own, otherwise the experience might be too jarring to start happening suddenly. refactor: await the disregarded promise instead of voiding it (code unrelated to this PR, but the change was required by ESLint.) ci: fix tests to use the commands rather than the keybinds, since I removed the default keybinds
77a447c to
6792106
Compare
|
I've fixed the test and this PR is now ready for final review. |
remove ESLint-mandated use of `void` operator Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
|
@webfiltered Thank you for the review. The "Socket Security: Pull Request Alerts" Github Action is queued, and I'm not sure if something is expected from either of us to get it to run. |
|
Yeah, weird. Nothing for it to do, though, so... |
|
In the future let's tag these types of PRs (UI/UX, product) with |
…t) (Comfy-Org#4066) Co-authored-by: duckcomfy <a@a.a> Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
closes #1265
Summary
This PR adds four new keyboard shortcuts
(CTRL + Up/Down/Left/Right Arrow Key)(unbound by default) which allow moving selected nodes by a set number of pixels, configured by theComfy.SnapToGrid.GridSizesetting.Video demonstration
comfy_ctrl_arrow-2025-06-03_21.35.51.webm
The shortcuts in the shortcut settings
┆Issue is synchronized with this Notion page by Unito