Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable DevTools in Atom Shell

I've been trying to figure out how to disable the devtools in Atom Shell. I've tried using a window event listener to no avail. It seems that the devtools-opened window event listener doesn't work. The devtools are still openable by Command+Option+I shortcut.

mainWindow.on('devtools-opened', function(){
    mainWindow.closeDevTools();
});

In the end I went with Mousetrap and had to use a e.preventDefault() on a Cmd+Shift+I shortcut listener. I'd rather not have to include the Mousetrap library if it's unnecessary but as of yet I can find nothing.

Does anyone know of a better way?

like image 880
Ding Avatar asked Jun 11 '26 04:06

Ding


1 Answers

Did you install a custom menu (i.e. overriding the default Atom Shell menu?) Once you do this, you'll actually have to explicitly implement the Devtools shortcut to get it to work.

like image 93
Ana Betts Avatar answered Jun 13 '26 17:06

Ana Betts