jeffvli / feishin

A modern self-hosted music player.
https://feishin.vercel.app
GNU General Public License v3.0
2k stars 79 forks source link

Global hotkeys still not working on 6.1 #546

Closed auyylaso closed 3 months ago

auyylaso commented 3 months ago

Expected Behavior

Pressing hotkey when in other apps should trigger the function

Current Behavior

Nothing occurs unless the app is currently focused

Steps to Reproduce

Enable global hot keys attempt to use.

Context

Just trying to pause music and change songs when playing games without having to tab out of the game

Your Environment

iiPythonx commented 3 months ago

Not able to replicate this on Linux or Windows 10, from my testing it works with both mpv and web players just fine.
Are you referring to global media keys as in the media keys/function on your keyboard or custom global media keys as set in the settings?

nathan-contino commented 3 months ago

I'm also experiencing this issue on macOS when I enable global media hotkeys. I see the following popup when I enable the option:

Screenshot 2024-03-16 at 12 21 11

...despite the fact that in System Settings > Privacy & Security > Accessibility, I've already enabled (and toggled back and forth, just to be sure) Feishin as a trusted accessibility client.

auyylaso commented 3 months ago

Not able to replicate this on Linux or Windows 10, from my testing it works with both mpv and web players just fine. Are you referring to global media keys as in the media keys/function on your keyboard or custom global media keys as set in the settings?

image image This is the hotkeys that aren't functioning. Shift+PageUp Shift+PageDown Shift+End none of them work. Rebooted my pc reinstalled Feishin the global hotkeys have never worked even from 5.3

iiPythonx commented 3 months ago

Actually, nevermind, they do seem to work after setting one as Shift+PageUp, marking it as a global hotkey, and then restarting Feishin. Based on your screenshot, the global media tickbox isn't checked.

auyylaso commented 3 months ago

Actually, nevermind, they do seem to work after setting one as Shift+PageUp, marking it as a global hotkey, and then restarting Feishin. Based on your screenshot, the global media tickbox isn't checked.

I thought the toggle switch was the checkbox lol I feel incredibly dumb as yes when I click the tiny check box that I didn't even notice the last like 6 months I've been using Feishin that resolves the issue.

iiPythonx commented 3 months ago

As for this issue:

I'm also experiencing this issue on macOS when I enable global media hotkeys.

That might be something @kgarner7 knows something about considering they're the one who authored https://github.com/jeffvli/feishin/pull/512.

nathan-contino commented 3 months ago
Screenshot 2024-03-22 at 08 59 31

For any other macOS users struggling with getting the play/pause/skip/prev keys to work on your keyboard, I solved the issue by explicitly granting Feishin the "Media and Apple Music" permission in System Settings > Privacy & Security. I guess Apple's description of "Apple Music, your music and video activity, and your media library" is missing an extra permission this grants -- the global media keys!

@kgarner7 I'm sure this isn't the highest priority issue, but it might be nice to update the error message to explicitly call out the "Media and Apple Music" permission. I tested several other possible permissions, including Full Disk Access (essentially a superpermission that grants everything), but this was the only one that worked.

It's also possible that my setup broke since I upgraded from an earlier version of Feishin, and new users will wind up granting the proper permission through a system dialog when they toggle "global media keys" on. Unfortunately in my case, toggling it off and on again didn't bring up the dialog.