aboutsummaryrefslogtreecommitdiffstats
path: root/DomeKey.xcodeproj
diff options
context:
space:
mode:
authorTeddy Wing2018-08-16 06:32:51 +0200
committerTeddy Wing2018-08-16 06:55:02 +0200
commit4e62e8ad7abf833a3d2cb7ddfe01161e91c648ad (patch)
treecb44d486c46068d6cbcdb8cddb1243e7a6906e0a /DomeKey.xcodeproj
parent9dd1e0b3b2485484fb89de3a924e9e6aacea5609 (diff)
downloadDomeKey-4e62e8ad7abf833a3d2cb7ddfe01161e91c648ad.tar.bz2
HeadphoneKey: Detect 3 headphone button types
Using my previous `NSLog`s, the `usageId`s came out to be 205, 233, 234. Converted these to hex and looked for corresponding constants in `/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/hid/IOHIDUsageTables.h`. Use these constants to figure out which button was presed. Will have to test other headphones. I'm worried the numbers may change for different headphones. Added a `KeyPress` enum that's a lot easier to understand than the `upOrDown` `BOOL`, whose meaning I completely didn't get until I looked at the `NSLog` output I had before.
Diffstat (limited to 'DomeKey.xcodeproj')
0 files changed, 0 insertions, 0 deletions