Skip to content

Commit b6df582

Browse files
Add README and update supported devices
Signed-off-by: black.dragon74 <[email protected]>
1 parent 83088d8 commit b6df582

File tree

3 files changed

+141
-5
lines changed

3 files changed

+141
-5
lines changed

README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# ROG-HID
2+
3+
(c) 2020 black.dragon74 aka Nick
4+
5+
macOS HID driver based on DriverKit for Asus ROG notebook built-in keyboard. Tested on 0b05:1869. Should support 0b05:1866, 0b05:1854, 0b05:1837, 0b05:1822.
6+
7+
For enhanced functionality, use with [ROGSwitch](https://github/com/black-dragon74/https://github.com/black-dragon74/ROGSwitch).
8+
9+
## Features
10+
- Supports setting display brightness using Fn Keys
11+
- Supports setting keyboard backlight brightness using Fn Keys
12+
- Fixes erratic behavior of CAPS Lock key on keyboards with CAPS Lock LED.
13+
14+
Many features such as touchpad toggle, display off, sleep and airplane mode require use of IOKit. Currently, there is no documentation of interfacing DriverKit with IOKit. These features are on my TODO and will be implemented in a future release.
15+
16+
## Installing
17+
18+
I do not have an apple developer certificate and hence the driver is unsigned, however there is a build available in the Releases for you to test. If it works, please let me know.
19+
20+
In order to use this driver, make sure your SIP is disabled and you have a free Apple developer account along with Xcode.
21+
22+
Then, you need to change the `codesign.sh` file to reflect your own developer identity. Follow the steps below to find and update your developer identity.
23+
24+
```sh
25+
# Find the code signing identity
26+
security find-identity -p codesigning -v
27+
```
28+
29+
Copy the identity you get and then open the `codesign.sh` file. Replace the existing identity with the new one.
30+
31+
Now we need to enable DriverKit development mode. Run `systemextensionsctl developer on` in Terminal.
32+
33+
Now run the following commands in Terminal to build and install.
34+
35+
```sh
36+
make
37+
make install
38+
```
39+
Now open the `ROG-HID.app` from Launchpad, click on `Activate ROG-HID Extension` and follow the instructions.
40+
41+
The driver won't attach right away as DriverKit drivers do not attach to pre-enumerated devices. You can either reboot or use the `reenumerate` utility found inside Utils folder. To use this utlity, you need to know the VendorID and ProductID of your Keyboard. You can re-enumerate a USB device like:
42+
43+
```sh
44+
#for vendor-id 0b05 and product-id 1869
45+
reenumerate -v 0x0b05,0x1869
46+
```
47+
48+
## Building
49+
50+
### From GitHub:
51+
52+
Install Xcode, clone the GitHub repo and enter the top-level directory. Then:
53+
54+
```sh
55+
make build
56+
```
57+
58+
## Credits
59+
60+
- Apple for no documentation of DriverKit
61+
- Linux for hid-asus.c
62+

ROG-HID-Driver/Info.plist

+77-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,83 @@
2020
<string>1</string>
2121
<key>IOKitPersonalities</key>
2222
<dict>
23-
<key>DummyDriver</key>
23+
<key>0b05_1822</key>
24+
<dict>
25+
<key>CFBundleIdentifier</key>
26+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
27+
<key>IOClass</key>
28+
<string>AppleUserHIDEventService</string>
29+
<key>IOKitDebug</key>
30+
<integer>16384</integer>
31+
<key>IOProviderClass</key>
32+
<string>IOHIDInterface</string>
33+
<key>IOUserClass</key>
34+
<string>ROG_HID_Driver</string>
35+
<key>IOUserServerName</key>
36+
<string>com.black-dragon74.ROG-HID-Driver</string>
37+
<key>VendorID</key>
38+
<integer>2821</integer>
39+
<key>ProductID</key>
40+
<integer>6178</integer>
41+
</dict>
42+
<key>0b05_1837</key>
43+
<dict>
44+
<key>CFBundleIdentifier</key>
45+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
46+
<key>IOClass</key>
47+
<string>AppleUserHIDEventService</string>
48+
<key>IOKitDebug</key>
49+
<integer>16384</integer>
50+
<key>IOProviderClass</key>
51+
<string>IOHIDInterface</string>
52+
<key>IOUserClass</key>
53+
<string>ROG_HID_Driver</string>
54+
<key>IOUserServerName</key>
55+
<string>com.black-dragon74.ROG-HID-Driver</string>
56+
<key>VendorID</key>
57+
<integer>2821</integer>
58+
<key>ProductID</key>
59+
<integer>6199</integer>
60+
</dict>
61+
<key>0b05_1854</key>
62+
<dict>
63+
<key>CFBundleIdentifier</key>
64+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
65+
<key>IOClass</key>
66+
<string>AppleUserHIDEventService</string>
67+
<key>IOKitDebug</key>
68+
<integer>16384</integer>
69+
<key>IOProviderClass</key>
70+
<string>IOHIDInterface</string>
71+
<key>IOUserClass</key>
72+
<string>ROG_HID_Driver</string>
73+
<key>IOUserServerName</key>
74+
<string>com.black-dragon74.ROG-HID-Driver</string>
75+
<key>VendorID</key>
76+
<integer>2821</integer>
77+
<key>ProductID</key>
78+
<integer>6228</integer>
79+
</dict>
80+
<key>0b05_1866</key>
81+
<dict>
82+
<key>CFBundleIdentifier</key>
83+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
84+
<key>IOClass</key>
85+
<string>AppleUserHIDEventService</string>
86+
<key>IOKitDebug</key>
87+
<integer>16384</integer>
88+
<key>IOProviderClass</key>
89+
<string>IOHIDInterface</string>
90+
<key>IOUserClass</key>
91+
<string>ROG_HID_Driver</string>
92+
<key>IOUserServerName</key>
93+
<string>com.black-dragon74.ROG-HID-Driver</string>
94+
<key>VendorID</key>
95+
<integer>2821</integer>
96+
<key>ProductID</key>
97+
<integer>6246</integer>
98+
</dict>
99+
<key>0b05_1869</key>
24100
<dict>
25101
<key>CFBundleIdentifier</key>
26102
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
@@ -34,10 +110,6 @@
34110
<string>ROG_HID_Driver</string>
35111
<key>IOUserServerName</key>
36112
<string>com.black-dragon74.ROG-HID-Driver</string>
37-
<key>PrimaryUsage</key>
38-
<integer>16</integer>
39-
<key>PrimaryUsagePage</key>
40-
<integer>65417</integer>
41113
<key>VendorID</key>
42114
<integer>2821</integer>
43115
<key>ProductID</key>

ROG-HID.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
0118C9AB24C6121500C1C663 /* ROG_HID_Driver.iig */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.iig; path = ROG_HID_Driver.iig; sourceTree = "<group>"; };
6666
0118C9AD24C6121500C1C663 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6767
0118C9AE24C6121500C1C663 /* ROG_HID_Driver.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ROG_HID_Driver.entitlements; sourceTree = "<group>"; };
68+
0176196324C77846007D4278 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
6869
/* End PBXFileReference section */
6970

7071
/* Begin PBXFrameworksBuildPhase section */
@@ -92,6 +93,7 @@
9293
children = (
9394
0118C98824C60E4500C1C663 /* ROG-HID */,
9495
0118C9A824C6121500C1C663 /* ROG-HID-Driver */,
96+
0176196324C77846007D4278 /* README.md */,
9597
0118C9A524C6121500C1C663 /* Frameworks */,
9698
0118C98724C60E4500C1C663 /* Products */,
9799
);

0 commit comments

Comments
 (0)