New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X media keys not working #1817

Closed
ghost opened this Issue Feb 10, 2016 · 29 comments

Comments

Projects
None yet
6 participants
@ghost

ghost commented Feb 10, 2016

In OS X, the system media keys (F7, F8, F9) won't control Quodlibet, while they work flawlessly with other players.

I'm running OS X 10.11.3 (15D21)

@lazka lazka added the enhancement label Feb 11, 2016

@lazka

This comment has been minimized.

Member

lazka commented Feb 11, 2016

We have some experimental support build in, but disabled by default.

You can delete the line containing QUODLIBET_NO_MMKEYS in QuodLibet.app/Contents/MacOS/_launcher

I guess we should make it an option in the "advanced preferences" plugin at least.

@timpulver

This comment has been minimized.

timpulver commented Feb 11, 2016

You can delete the line containing QUODLIBET_NO_MMKEYS in QuodLibet.app/Contents/MacOS/_launcher

Does not work on OS X 10.11.3. When pressing one of the media keys iTunes is launched and Quod Libet does not react. Other music players like Spotify or Vox work fine with media keys on my system.

piotrdrag pushed a commit to piotrdrag/quodlibet that referenced this issue Feb 13, 2016

Browsers: add logging for item display (quodlibet#1817)
 * And correct extra whitespace in default
 * See also quodlibet#1811 for which this should aid investigation

lazka added a commit that referenced this issue Feb 18, 2016

@lazka

This comment has been minimized.

Member

lazka commented Feb 18, 2016

There was a plan [0] to add SPMediaKeyTap [0] which apparently other players are using, but I'm not sure how one would do that.

I've added an mmkeys switch in the advanced preferences plugin now so it can be tested without env vars. It used to kinda work at some point but something might have broken it since then.. I work in a VM, so no mmkeys :/

[0] elelay/quodlibet-osx-bundle#8
[1] https://github.com/nevyn/SPMediaKeyTap

@timpulver

This comment has been minimized.

timpulver commented Feb 20, 2016

Working fine in the latest version. This should be enabled by default!

@lazka

This comment has been minimized.

Member

lazka commented Feb 22, 2016

Good to know. I think there were some problems with it slowing down mouse events and the global menu because it has to inspect every user input event which is a problem if QL is busy.

@timpulver

This comment has been minimized.

timpulver commented Feb 22, 2016

No problems so far, but I will let you know…

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 13, 2016

Hey all,

First post

Thanks for software - really excited to leave iTunes behind

OS X media keys would be great, however they don't work out of the box for me[1] 🤔

How would one get them working; if at all possible?

Hope to hear back

Kind thanks

[1]
device: Apple MBP (desktop)
platform: OS X
type: Desktop
version: 10.11.5

@urielz

This comment has been minimized.

Contributor

urielz commented Jul 14, 2016

@ldexterldesign They're disabled by default. Go to Music, Plugins and then Advanced Preferences. Change "OS X Multimedia Keys" from false to true.

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 15, 2016

Hey @urielz,

Awesome!

Hadn't seen these plugins - is there an official URL to browse plugins/documentation or is everything WYSIWYG inside the app'?

Hope to hear back

Kind thanks

@urielz

This comment has been minimized.

Contributor

urielz commented Jul 18, 2016

Not that I'm aware of. I haven't explored all the available plugins as well, but every now and then people mentioned here in the forums new things you can do with a plugin that I was not aware of. QL is amazing :)

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 19, 2016

@urielz got a forum URL or do you literally mean here [https://github.com/quodlibet/quodlibet/issues]?

Yours hopefully

@urielz

This comment has been minimized.

Contributor

urielz commented Jul 20, 2016

Yes, I meant /quodlibet/issues. -cheers

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 21, 2016

@urielz hmm, since there's no easy way to subscribe (e.g. Atom/RSS) to new https://github.com/quodlibet/quodlibet/issues issues it's unlikely I'll check back here unless I have a bug/enhancement / feature request / help/idea/question/suggestion

Does anyone know a way of accessing the list of plugins outside the app' - else would a [documentation] feature request be wise?

Yours hopefully

@declension

This comment has been minimized.

Member

declension commented Jul 21, 2016

@ldexterldesign this is not really something that can work reliably, as the enabled, relevant, non-erroring plugins can only be determined at runtime.

If you just want to have a look at a rough list of all of them, you could try something like:

python -c 'import site; print "\n".join(site.getsitepackages())' | xargs -i@ find @/quodlibet/ext/ -mindepth 2 -maxdepth 2 -type d -exec basename {} \;  -o -regex '.*[a-z]\.py' -exec basename {} \; 2>/dev/null | sort 

@lazka lazka closed this in 9bdc1e9 Jul 21, 2016

@lazka lazka added the macOS label Jul 21, 2016

@lazka

This comment has been minimized.

Member

lazka commented Jul 21, 2016

Now enabled by default. Let's see...

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 21, 2016

Hey @declension,

Thanks for reply

Unfortunately the script failed:

Apple-MacBook-Pro:Desktop ldexterldesign$ python -c 'import site; print "\n".join(site.getsitepackages())' | xargs -i@ find @/quodlibet/ext/ -mindepth 2 -maxdepth 2 -type d -exec basename {} \;  -o -regex '.*[a-z]\.py' -exec basename {} \; 2>/dev/null | sort 
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

Hope to hear back, since I'd be interested in the output

Kind thanks

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 21, 2016

@lazka great!

IMO it makes more sense to have "Music > Plugins > Advanced Preferences" grouped with "Quod Libet > Preferences" - I would have never discovered the OS X multimedia keys option without asking or going one-by-one through the plugins (I'm a completist, so I probably would have sooner or later anyway) 😕

Kind regards

@declension

This comment has been minimized.

Member

declension commented Jul 22, 2016

@ldexterldesign weird. Can't reproduce that (on Linux). Maybe it's the different xargs. Can you try:

python -c 'import site; print "\n".join(site.getsitepackages())' | xargs -I@ find @/quodlibet/ext/ -mindepth 2 -maxdepth 2 -type d -exec basename {} \;  -o -regex '.*[a-z]\.py' -exec basename {} \;  | sort 
@declension

This comment has been minimized.

Member

declension commented Jul 22, 2016

(Interesting background to that error message)

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 22, 2016

@declension

Apple-MacBook-Pro:~ ldexterldesign$ cd ~/Desktop/
Apple-MacBook-Pro:Desktop ldexterldesign$ python -c 'import site; print "\n".join(site.getsitepackages())' | xargs -I@ find @/quodlibet/ext/ -mindepth 2 -maxdepth 2 -type d -exec basename {} \;  -o -regex '.*[a-z]\.py' -exec basename {} \;  | sort 
find: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/quodlibet/ext/: No such file or directory
find: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/site-python/quodlibet/ext/: No such file or directory
find: /Library/Python/2.7/site-packages/quodlibet/ext/: No such file or directory

http://stackoverflow.com/questions/12790328/how-to-silence-sys-excepthook-is-missing-error - sorry, more of a front-end fella, so the Python stuff is over my head 😖

Kind regards

@lazka

This comment has been minimized.

Member

lazka commented Jul 22, 2016

IMO it makes more sense to have "Music > Plugins > Advanced Preferences" grouped with "Quod Libet > Preferences" - I would have never discovered the OS X multimedia keys option without asking or going one-by-one through the plugins (I'm a completist, so I probably would have sooner or later anyway) 😕

The advanced preferences (each separately) should either be rendered unnecessary or moved into the main preferences. In this case it was removed.

Regarding the python snippets: QL doesn't use the OSX provided Python, but ships its own.

@declension

This comment has been minimized.

Member

declension commented Jul 22, 2016

Raised #1994 for plugin list / docs

@ldexterldesign

This comment has been minimized.

ldexterldesign commented Jul 23, 2016

Hey,

Thanks for taking my feature request onboard

My two cents: three [open source] apps I use with very organised plugin support:

http://mozilla.org/en-US/thunderbird/ ~ https://addons.mozilla.org/en-US/thunderbird/
http://musicbrainz.org/ ~ https://picard.musicbrainz.org/plugins/
http://sublimetext.com/ ~ https://packagecontrol.io/

Hope this is useful

Kind regards

@MKevin3

This comment has been minimized.

MKevin3 commented Jan 3, 2018

Media keys don't work for me in the 4.x release. Using Mac / latest OS / Microsoft Natural 4000 keyboard. They work with other players. The advanced setting seems to be correct in a double negative sort of way "disable multimedia keys = false" which I think means they should be enabled. The alternate shortcut list in the menu to play is + SPACE which on a Mac brings up spotlight so that is not a good key to use for music control.

Would be nice if there was a way to set what key or key sequence you wish to use to control the app.

@lazka

This comment has been minimized.

Member

lazka commented Jan 3, 2018

@MKevin3 Did it work before for you?

@MKevin3

This comment has been minimized.

MKevin3 commented Jan 3, 2018

I thought it worked once with a 3.x series but did not work with the last 3.x series I used and has not worked with 4.x which I just upgraded to today.

I think with the 3.x series it only worked if the app was in focus, not if I was in my code IDE. Now it does not appear to work at all.

@lazka

This comment has been minimized.

Member

lazka commented Jan 3, 2018

Ok, thanks. Maybe it's due to some changes in macOS then.

@urielz

This comment has been minimized.

Contributor

urielz commented Jan 4, 2018

@lazka most likely. It's working for me on QL4 & good old OS X 10.11.6

@lazka

This comment has been minimized.

Member

lazka commented Jan 4, 2018

@urielz thanks, that rules out Python 3 changes.

I've opened #2692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment