Virtual devices (keyboard and mouse) implementation for macOS using DriverKit.
- Implemented:
- Extension manager
- Virtual HID keyboard
- Virtual HID pointing
- Virtual HID device client (Need to disable SIP at the moment.)
System requirements to build Karabiner-Elements:
- macOS 10.15+
- Xcode 11+
- Command Line Tools for Xcode
- XcodeGen
-
Replace
CODE_SIGN_IDENTITY
atsrc/scripts/codesign.sh
with yours. (The codesign identity is required even if you disabled SIP in order to inject entitlements into your driver extension.)Find your codesign identity by executing the following command in Terminal.
security find-identity -p codesigning -v
The result is as follows.
1) 8D660191481C98F5C56630847A6C39D95C166F22 "Developer ID Application: Fumihiko Takayama (G43BCU2T37)" 2) 6B9AF0D3B3147A69C5E713773ADD9707CB3480D9 "Apple Development: Fumihiko Takayama (YVB3SM6ECS)" 3) 637B86ED1C06AE99854E9F5A5DCE02DA58F2BBF4 "Mac Developer: Fumihiko Takayama (YVB3SM6ECS)" 4) 987BC26C6474DF0C0AF8BEA797354873EC83DC96 "Apple Distribution: Fumihiko Takayama (G43BCU2T37)" 4 valid identities found
Choose one of them (e.g.,
6B9AF0D3B3147A69C5E713773ADD9707CB3480D9
) and replace existingCODE_SIGN_IDENTITY
with yours as follows.# Replace with your identity readonly CODE_SIGN_IDENTITY=6B9AF0D3B3147A69C5E713773ADD9707CB3480D9
-
(Optional) Replace team identifier, domain and embedded.provisionprofile if you want to test your driver with SIP enabled environments.
-
Search
G43BCU2T37
and replace them with your team identifier if you want to test your driver with SIP enabled environments.git grep G43BCU2T37 src/
-
Search
org.pqrs
andorg_pqrs
, then replace them with your domain if you want to test your driver with SIP enabled environments.git grep org.pqrs src/ git grep org_pqrs src/
-
Replace
embedded.provisionprofile
file with yours.find * -name 'embedded.provisionprofile'
-
-
Build by the following command in terminal.
cd src make
build/Release/Karabiner-DriverKit-ExtensionManager.app
will be generated.