1

I want to intercept function-key strokes in MacOS, not Fx keys, but specifically Volume Up/Down and Mute.

Obviously, this should be done in a global way, not only when my program is frontmost.

I read this can be achieved using a CGEventTap, but it requires either root priviledges or assistive devices access to be enabled for the application.

VLC does this with Back/Playback/Next function-keys, if it is playing it completely overrides iTunes control. And it does it without being root or even having assistive devices access enabled.

Any idea?

Community
  • 1
  • 1
Teejay
  • 7,210
  • 10
  • 45
  • 76
  • Search for "media keys". Also, VLC is open source. – Ken Thomases Oct 21 '15 at 15:11
  • @KenThomases Yes, I know it, one way I considered is in fact inspecting VLC sources. But before, I just want to know if Volume keys could be considered like Media keys, or if they are more "system-level" (and therefore not overridable). – Teejay Oct 21 '15 at 15:13

0 Answers0