Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Electron Version
13.1.7
What operating system are you using?
macOS
Operating System Version
Big Sur
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
No response
Expected Behavior
globalShortcut.register('MediaPlayPause', ...)
should be working and pressing that key should trigger the callback in the function.
Actual Behavior
The Music app starts (if not previously started) when this key is pressed.
None of the other media shortcuts seem to work.
Testcase Gist URL
https://gist.github.com/AxelTerizaki/3e9c08586f7912f347e44e26ad25c3d0
Additional Information
I tried a few things while fiddling.
I added my app to System Preferences > Security & Privacy > Input Monitoring, but to no avail. I also added the electron.app fiddle downloaded there just to make sure.
Protip: move ~/Library/Application Support/Electron Fiddle/electron-bin
to your home directory and create a symlink from there to the electron fiddle folder in app support so you can browse to the electron-bin folder and add the electron.app to security and privacy. Finder won't allow you to browse through Library
by default, it's hidden.
There are numerous issues on this topic, namely #24052 where adding the app to input monitoring apparently works with Electron 8. It might be a regression but I am not quite sure : Electron 8 isn't available through fiddle. I went as far back as 11.4.11 and couldn't get it to work.
Note : I tested this on an Apple Silicon but it likely affects Intel versions too.
Any help would be appreciated! :)