enable cmd shortcuts for mac (mute & bypass) (#3792)

This commit is contained in:
ruucm 2024-07-01 10:45:34 -07:00 committed by GitHub
parent 7c5fa7f4a2
commit e53b1592ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1084,7 +1084,7 @@ export class ComfyApp {
if (e.type == "keydown" && !e.repeat) { if (e.type == "keydown" && !e.repeat) {
// Ctrl + M mute/unmute // Ctrl + M mute/unmute
if (e.key === 'm' && e.ctrlKey) { if (e.key === 'm' && (e.metaKey || e.ctrlKey)) {
if (this.selected_nodes) { if (this.selected_nodes) {
for (var i in this.selected_nodes) { for (var i in this.selected_nodes) {
if (this.selected_nodes[i].mode === 2) { // never if (this.selected_nodes[i].mode === 2) { // never
@ -1098,7 +1098,7 @@ export class ComfyApp {
} }
// Ctrl + B bypass // Ctrl + B bypass
if (e.key === 'b' && e.ctrlKey) { if (e.key === 'b' && (e.metaKey || e.ctrlKey)) {
if (this.selected_nodes) { if (this.selected_nodes) {
for (var i in this.selected_nodes) { for (var i in this.selected_nodes) {
if (this.selected_nodes[i].mode === 4) { // never if (this.selected_nodes[i].mode === 4) { // never