I have a Catalyst app that plays audio via AVQueuePlayer
, and I'd like to use the system play/pause key (F8 on my MacBook Pro keyboard) to play and pause it. It doesn't seem to work automatically, and if I hook up a UIKeyCommand
using UIKeyInputF8
, it works with Fn-F8, not F8 on its own.
It does seem to work in Overcast's Mac app, but I think that's an iPad app for Mac, not Catalyst, so it's probably going through whatever system pathway that the Lock Screen controls would be using on iOS.
How do I make this work on Catalyst?