signal11 / hidapi

A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac, and Windows.
http://www.signal11.us/oss/hidapi/
Other
2.47k stars 901 forks source link

Mac: hid_open_path in non exclusive mode #453

Open mattsains opened 4 years ago

mattsains commented 4 years ago

This pull request revives https://github.com/signal11/hidapi/pull/297 by making the change suggested in that pull request.

This build successfully on OSX Catalina with build tools from homebrew.

Mubramaj commented 4 years ago

I use this library with a keyboard that has a volume knob and some media keys to control de musique. When the path is opened with kIOHIDOptionsTypeSeizeDevice according to the apple documentation:

Used to open exclusive communication with the device. This will prevent the system and other clients from receiving events from the device

So the MAC OS was not recognizing the volume knob events or the media key events.

This pull request solves the issue because it uses the non exclusive mode.

Why this pull request is not being merged ? @signal11 I am just curious

Youw commented 4 years ago

Please see #373