react-native-debugger icon indicating copy to clipboard operation
react-native-debugger copied to clipboard

CMD+R shortcut is conflicting with main Chrome app

Open rdsedmundo opened this issue 3 years ago • 4 comments

I was being driven crazy by the fact that Chrome CMD+R suddenly stopped working and no matter what I did, incognito mode, disabling all extensions, nothing would make it work again.

Then searching on the Internet I found that perhaps some other application was conflicting with it and downloaded ShortcutDetective, and bingo! It was that. It reported that the React Native Debugger app was listening to the event, even though it was in the background and I had Chrome focused.

I realize that this might be a quirk behavior due to the fact that RN debugger uses Chrome Devtools under the hood, but I haven't ever had this problem occur with the DevTools of Chrome itself (reload being hijacked when it's not focused).

React Native Debugger app version: 0.11.8 React Native version: 0.64.1 Platform: iOS, Android Is real device of platform: Yes Operating System: macOS

rdsedmundo avatar Jun 01 '21 08:06 rdsedmundo

Just realized it's also conflicting with Datagrip (CMD+R too).

rdsedmundo avatar Jun 08 '21 14:06 rdsedmundo

@jhen0409 do you have any input on this? I'm not too much familiar with Electron, but I wonder if it has to do with the usage of this globalShortcut module?

The globalShortcut module can register/unregister a global keyboard shortcut with the operating system so that you can customize the operations for various shortcuts. Note: The shortcut is global; it will work even if the app does not have the keyboard focus. This module cannot be used before the ready event of the app module is emitted.

Is there a reason to not use a local shortcut instead?

rdsedmundo avatar Jun 08 '21 14:06 rdsedmundo

The background is from #153, then I used globalShortcut instead of the electron-localshortcut module.

We may can try the latest version of electron-localshortcut back. @rdsedmundo could you test with it?

jhen0409 avatar Jun 08 '21 21:06 jhen0409

Also, we unregistered all shortcuts on window hide / blur / minimize, you may be need to investigate why it not working for you.

jhen0409 avatar Jun 08 '21 22:06 jhen0409