Skip to content

xd2/Karabiner-DriverKit-VirtualHIDDevice

 
 

Repository files navigation

Build Status License

Karabiner-DriverKit-VirtualHIDDevice

Virtual devices (keyboard and mouse) implementation for macOS using DriverKit.

Status

  • Implemented:
    • Extension manager
    • Virtual HID keyboard
    • Virtual HID pointing
    • Virtual HID device client (Need to disable SIP at the moment.)

Documents

Screenshots

  • System Preferenecs (macOS detects the virtual keyboard)

    System Preferences

  • Extension manager

    Extension manager

  • Client

    Client


For developers

How to build

System requirements to build Karabiner-Elements:

  • macOS 10.15+
  • Xcode 11+
  • Command Line Tools for Xcode
  • XcodeGen

Steps

  1. Replace CODE_SIGN_IDENTITY at src/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 existing CODE_SIGN_IDENTITY with yours as follows.

    # Replace with your identity
    readonly CODE_SIGN_IDENTITY=6B9AF0D3B3147A69C5E713773ADD9707CB3480D9
  2. (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 and org_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'
  3. Build by the following command in terminal.

    cd src
    make

    build/Release/Karabiner-DriverKit-ExtensionManager.app will be generated.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 70.2%
  • Swift 17.9%
  • Makefile 6.0%
  • Shell 2.4%
  • Python 1.9%
  • C 1.0%
  • CMake 0.6%