Keyboard and mouse focused virtual input package using gamepad-style naming across the API.
This package currently provides high-level keyboard and mouse state classes and device identity helpers under a gamepad-style naming scheme.
- Manages key and modifier state with
VirtualGamepadKeyboard - Manages pointer movement, scroll, and buttons with
VirtualGamepadMouse - Generates device identity fields with
VirtualGamepadConfiguration - Does not include network, UI, or platform-specific OS injection code
- macOS 15.0 or later
- Xcode 16 or later
- Swift 6.0 or later
Add the following to your Package.swift:
dependencies: [
.package(url: "https://github.com/CoreOrbits/gamerpad-hid-core", from: "1.0.0")
]import GamerpadHIDCore
let keyboard = VirtualGamepadKeyboard()
let mouse = VirtualGamepadMouse()
await keyboard.connect()
try await keyboard.press(.a)
try await keyboard.setModifier(.leftShift, active: true)
await mouse.connect()
try await mouse.moveBy(x: 24, y: -8)
try await mouse.setButton(.left, pressed: true)MIT License — see LICENSE for details.
- CoreOrbits Gamerpad — Full macOS server application