Skip to content

Instantly share code, notes, and snippets.

@dragonfax
dragonfax / README.md
Last active April 17, 2018 02:32
output readings from a Griffin PowerMate USB on osx

I was toying around with my PowerMate USB on the Mac.

I noticed that in the PowerMate application, you can set triggers for mouse wheel scrolling. But some applications coughMAMEcough don't pick it up.

Investigating I found that it provides its spinner as a uncommon HID type. So applications ignore it, not knowing how to handle that.

The click is presented as a normal button though. So no big deal there.

  1. brew install libusb
  2. brew install hidapi
/**
* Several macros simplifying use of weak references to self inside blocks
* which goal is to reduce risk of retain cycles.
*
* Example:
* @code
@interface Example : NSObject{
int _i;
}