There is a way in the mac world to monitor all the signals an HID device (a remote) sends to the OS? The final aim is to handle those and remap them to keyboard shortcuts.

More details: a Logitech remote I have (Logitech S510 media remote, a combo keyboard/mouse/remote) doesn't works on macOS (just the volume controls and few other buttons works). I was wondering if there is an easy way (in any language) to listen the remote signals and remap them. So the first step is to find a way to monitor the signals and check if all buttons signals are recognized by the OS.

  • Would this be considered a programming question and better elsewhere? Unsure here... Apr 22, 2019 at 15:02
  • I’m not sure why the need to be vague with the question; “ a Logitech remote...doesn’t work on macOS.” Which specific remote? How does it (not) work with macOS? How do you know it’s an HID device if it doesn’t work with the OS? There’s TONS of missing details here.
    – Allan
    Apr 22, 2019 at 15:57
  • 1
    the remote is part of the kit Logitech S510. Some buttons of the remote works (volume controls, media buttons play/stop/pause) because they are standard signals. I want to use the other buttons. Apr 22, 2019 at 16:02
  • The s510 is keyboard and Mouse combo; nowhere on Logitech’s site do they have a “kit” that includes a remote. Please post a photo showing the device and any model numbers so we can identify what you’re referring to
    – Allan
    Apr 22, 2019 at 16:26
  • 1
    Just search for Logitech S510 media remote Apr 22, 2019 at 17:16

1 Answer 1



To monitor input events sent to macOS from Human Interface Devices (HID), look at NSEvent's addGlobalMonitorForEventsMatchingMask:handler:. This is the method used to associate scripts and tasks to hotkeys by third party macOS tools.

You will likely need to write in Objective-C or Swift and codesign the resulting binary. I expect you will also need to grant the binary additional access rights at runtime – probably in the Accessibility panel of System Preferences > Security & Privacy.

A search on GitHub will provide a few sample projects using this method.

  • 1
    indeed this is a proper answer to the question. I know nothing about Swift, but I will take a look. I hope at OS API level there is a way to discriminate keyboard and remote by their device IDs or something. Thank you Apr 28, 2019 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .