Skip to content

Add support for Darwin's exclusive access APIs#70

Open
ndreys wants to merge 1 commit into
apmorton:masterfrom
ndreys:master
Open

Add support for Darwin's exclusive access APIs#70
ndreys wants to merge 1 commit into
apmorton:masterfrom
ndreys:master

Conversation

@ndreys

@ndreys ndreys commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Add function prototypes for APIs related to device exclusive access control on Mac OS. By default all HID devices are opened in exclusive mode and in order to be able to share the device a call to

hidapi.hid_darwin_set_open_exclusive(0)

needs to be made before opening said device. To facilitate that, let's expose it and other related functions.

Add function prototypes for APIs related to device exclusive access
control on Mac OS. By default all HID devices are opened in exclusive
mode and in order to be able to share the device a call to

    hidapi.hid_darwin_set_open_exclusive(0)

needs to be made before opening said device. To facilitate that, let's
expose it and other related functions.
@ndreys

ndreys commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

I could find a good high level place to put some kind of an interface for hid_darwin_set_open_exclusive() so I just left it as is. I'm almost tempted to have a call to hidapi.hid_darwin_set_open_exclusive(0) in __init__.py to match the behavior on Linux and Windows, but that might be too opinionated for a library. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant