-
Notifications
You must be signed in to change notification settings - Fork 975
Add the ability to close developer tools via keyboard shortcut on macOS #45
Comments
cmd+shift+J works to toggle on and off, but I'm not sure why the menu accelerator wouldn't work. Seems to work fine for other "focusedWindow" shortcuts |
J will work because it's the same window. For client devtools electron has it hard coded to always open in a new window. And that window isn't registered for local shortcuts. |
yea, I bet it gets unregistered when the window re-renders and the shortcut doesn't make it back in |
the other shortcuts are registered in both places |
I don't think we register the devtools window at all. I think it is considered different than the browser windows and local shortcuts doesn't know about them. |
Oh I see now, the problem is when the dev tools opens up in its own window. CMD-W is also an issue there and causes and error |
this ended up being much more complicated than it seemed, but I think I can fix it using the devtools-focused event |
actually it looks like it will require a patch to electron. This is also broken in the Atom Editor |
ok probably not worth the extra effort for now. |
yea, I'm just going to fix the crash for cmd-w |
I think this should be enough to get it working electron/electron#3783 |
Command+W does get fired btw from when you have the devtools window focused. But we'd need to send a different event instead of firing I think localShortcuts still won't work though, but menu ones should. |
might be a little tricky to handle because there can be multiple dev windows open for the same window and I don't think we can currently tell which one has focus |
true not sure if there's a property to link it up to the opened from window. |
we could use this:
|
BTW, shortcut for the dev tool should be F12 like other browsers |
@LoloIrie F12 added for 0.9.0. |
Yep I'm aware of that one as well but pls ask any questions about its prioirty in the context of that bug. |
@bbondy thanks. |
Still an issue in 0.12.8. Prioritizing to 1.2 |
+1 on request for cmd+W to close dev tools window |
@luixxiul @srirambv @alexwykoff I renamed the title for this to be specific to mac and I posted a new issue here to track the work on the other platforms: Please test this only on mac. |
After opening content dev tools, you can't use the local shortcut to close them again.
STR:
Expected results:
It closes even though the devtools window has focus
Actual results:
You need to focus back to the parent window first.
@bridiver maybe we need to register with localShortcut the devtools window?
The text was updated successfully, but these errors were encountered: