How can I disable cmd+tab in mac app using electron

Viewed 15

I am trying to capture cmd+tab for mac and meta+tab for windows using globalShorcuts in my react desktop app. But I am not able to capture that. I can capture other combinations but I want this proccess switching to disable.

 globalShortcut.register('CommandOrControl+Y', () => {
    console.log("CommandOrControl+Y is pressed: Shortcut Disabled");
    // Do stuff when Y and either Command/Control is pressed.
  })

  globalShortcut.register('CommandOrControl+Tab', () => {
    console.log("Meta+TAB is pressed: Shortcut Disabled");
    // Do stuff when Y and either Command/Control is pressed.
  })

0 Answers
Related