osx-hid-inspector is a command line tool for macOS for inspecting human input devices (HID).
macOS Sierra (10.12) or later.
- Download
dist/hid-inspector.dmg
. - Open
hid-inspector.dmg
. - Use
/Volumes/hid-inspector/bin/hid-inspector
.
- CMake (
brew install cmake
)
Execute make command on the terminal.
make
src/build_xcode/build/Release/hid-inspector
is a built file.
-
Show help
hid-inspector --help
-
Result:
Show details of human input devices. Usage: hid-inspector [OPTION...] --help Print help. Output format options: --version Output version. --output-all-properties-json Output all properties in json format. --output-usages Output usage pages and usages. Examples: hid-inspector --version hid-inspector --output-all-properties-json hid-inspector --output-usages
-
-
Show usage pages, usages of all human input devices
hid-inspector --output-usages
-
Result:
registry_entry_id: 4294985109 Manufacturer: "Apple Inc." Product: "Apple Internal Keyboard / Trackpad" DeviceUsagePairs: [{"DeviceUsage":11,"DeviceUsagePage":65280}] PrimaryUsagePage: 65280 PrimaryUsage: 11 ------------------------------ usage_page: 0 usages: [ -1, 0, ] (2 entries) ------------------------------ usage_page: 65280 usages: [ -1, 11, ] (2 entries) ======================================== registry_entry_id: 4294985114 Manufacturer: "Apple Inc." Product: "Apple Internal Keyboard / Trackpad" DeviceUsagePairs: [{"DeviceUsage":6,"DeviceUsagePage":1}] PrimaryUsagePage: 1 PrimaryUsage: 6 ------------------------------ usage_page: 0 usages: [ -1, 0, ] (2 entries) ------------------------------ usage_page: 1 usages: [ 6, ] (1 entries) ------------------------------ usage_page: 7 usages: [ -1 ... 255, ] (257 entries) ------------------------------ ...
-
-
Show human input device properties in json
hid-inspector --output-all-properties-json
Note: This command outputs too much data, thus takes about 10 seconds.
-
Result:
[ { "class_name": "AppleUserHIDDevice", "name_in_plane": "AppleUserUSBHostHIDDevice", "path": "IOService:/AppleACPIPlatformExpert/...", "properties": { "BootProtocol": 1, "CFBundleIdentifier": "com.apple.AppleUserHIDDrivers", "CFBundleIdentifierKernel": "com.apple.iokit.IOHIDFamily", "CountryCode": 0, "DebugState": { "InputReportCount": 730767, "InputReportTime": 4165427 }, "DeviceOpenedByEventSystem": true, "DeviceUsagePairs": [ { "DeviceUsage": 6, "DeviceUsagePage": 1 } ], "Elements": [ ... ], ... } } ... ]
-