Skip to content

Commit

Permalink
Add keyboard shortcut for pin/unpin node
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Sep 5, 2024
1 parent 25a3c30 commit 5dc6140
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/scripts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,17 @@ export class ComfyApp {
block_default = true
}

// p pin/unpin
if (e.key === 'p') {
if (this.selected_nodes) {
for (const i in this.selected_nodes) {
const node = this.selected_nodes[i]
node.pin()
}
}
block_default = true
}

// Alt + C collapse/uncollapse
if (e.key === 'c' && e.altKey) {
if (this.selected_nodes) {
Expand Down

0 comments on commit 5dc6140

Please sign in to comment.