Support for mac media keys

MOC version: 

Would it be possible to support the mac media keys natively?

Akin to mpv's input-media-keys option
It works wonderfully!

I can have a look at what MPV does (and thanks for that link), but it won't be any time soon.

Also, I don't have a Mac upon which to develop or test and have only ever used one once (back in the 1990s) and then only very briefly, so I have no idea at this stage how feasible it would be or what the user would expect results of its use should be.

However, if someone wants to chip in and provide it (and will actually be able to do something without handholding from me) then they should feel free to contact mocmaint.

Thanks for the reply.

As of right now I have no way of using the media keys, as they can't be used for shortcuts, which stops me from usinc moc.

Hopefully somebody chips in :)

I've now looked at the patch with implements this in MPV, and there are several things which disturb me.

According to that patch, the API used is not public and the hardcoded values used were determined by reverse engineering. This makes the implementation quite fragile, IMHO. Also, it implements a quite limited functionality.

That said, the patch was committed back in 2013 and things may have changed in the last six years but that was not within the scope of my investigation.

It also mentions Quartz Event Taps about which I know nothing (and I'm guessing is OSX-specific). In short, the implementation in MOC would involve components of a software ecosystem in which I have absolutely no experience. I think my limited time would be more effectively used to move forward features within MOC which are applicable to a wider audience.

(I e-mailed my MOC-friendly, HomeBrew contributor asking for advice but have not received a reply to date.)

Thanks for looking into it.

The Quartz Event Taps does indeed look difficult to implement without having access to the OS.

I would be happy with an option to just use the hard-coded media keys without it. The reason is because I actually disable iTunes, since I never use it. So the media keys are free to whatever program is active at the time.
Of course this would have to be an option.