-
Couldn't load subscription status.
- Fork 393
feat: add keyboard shortcut to move selected nodes (unbound by default) #4066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - will merge once the minor nits are in. ... and thank you!
remove ESLint-mandated use of `void` operator Co-authored-by: filtered <[email protected]>
Co-authored-by: filtered <[email protected]>
|
@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 <[email protected]> Co-authored-by: filtered <[email protected]>
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