libvirtualhid is a cross-platform C++ library for creating virtual input devices. It focuses on gamepad support for remote streaming hosts, while keeping the public API portable and hiding platform-specific virtual HID details behind backend implementations.
Create virtual gamepads on Windows
A license is required for virtual gamepads created through the Windows Virtual HID Driver. Non-Windows backends do not currently require a license. Choose a yearly or lifetime license at checkout.
Features
Platform-neutral C++ API
Build against portable runtime, profile, device, and report concepts while backend-specific HID details stay behind the library implementation.
Gamepad-first profiles
Create virtual gamepads that model generic HID, Xbox, DualShock, DualSense, and Nintendo Switch Pro-style controller layouts.
Remote streaming ready
Designed for low-latency streaming hosts that need predictable lifecycle, normalized input state, and output feedback callbacks.
User-mode Windows support
Windows gamepads are exposed through a user-mode UMDF2 control driver backed by Virtual HID Framework, without requiring a custom kernel-mode driver.
Linux HID backends
Linux gamepads use descriptor-driven uhid devices, with uinput available for keyboard, mouse, touchscreen, trackpad, and pen tablet devices.
CMake friendly
Consume libvirtualhid through installed packages, vendored source, add_subdirectory, or FetchContent in CMake-based projects.
Virtual HID Driver
Explore the separate Windows driver package for compatible applications that create virtual HID gamepads.
Documentation
Read the documentation to learn how to build, use, and integrate libvirtualhid.
Source
Browse the library source, public headers, and streaming-host-oriented examples.