Skip to content

feat(input): implement libvirtualhid - #5368

Draft
ReenigneArcher wants to merge 1 commit into
masterfrom
libvirtualhid
Draft

feat(input): implement libvirtualhid#5368
ReenigneArcher wants to merge 1 commit into
masterfrom
libvirtualhid

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Jul 3, 2026

Copy link
Copy Markdown
Member

Description

This PR implements libvirtualhid in Sunshine, replacing inputtino on Linux, vigembus on Windows AMD64, and moves the mouse/keyboard input for macOS as well.

We will still falling back to vigembus on Windows ARM64 or in cases where the user doesn't have libvirtualhid's driver installed.

TODO:

  • CI/CD passing
  • Sonar
  • Ensure we cover changes in the following PRs:
  • Test coverage
  • Testing
    • Windows
      • Gamepads
      • Keyboard
      • Mouse
      • Touchscreen
      • Pen
      • Trackpad (not supported on Windows)
    • Linux
      • Gamepads
      • Keyboard
      • Mouse
      • Touchscreen
      • Pen
      • Trackpad
    • FreeBSD
      • Gamepads
      • Keyboard
      • Mouse
      • Touchscreen
      • Pen
      • Trackpad
    • macOS
      • Gamepads (not supported on macOS currently)
      • Keyboard
      • Mouse
      • Touchscreen (not supported on macOS)
      • Pen (not supported on macOS)
      • Trackpad (not supported on macOS)
  • Remove vigembus helpers from web-ui
  • Create release of libvirtualhid
  • Publish libvirtualhid driver to MSFT store

Known issues:

  • Xbox Series gamepad on Windows - missing "Share/Misc" button
  • DS4/DS5/Nintendo Switch Pro gamepads - rumble does not work

Screenshot

image

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher ReenigneArcher changed the title feat: implement libvirtualhid feat(input): implement libvirtualhid Jul 3, 2026
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 1.57MB (-64.13%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sunshine-esm 877.9kB 15.44kB (1.79%) ⬆️
rapideye-esm (removed) -788.77kB (-100.0%) ⬇️
Feilida-esm (removed) -795.99kB (-100.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sunshine-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/logo-*.js 3.63kB 384.41kB 0.95%
assets/logo-*.css 4.78kB 285.78kB 1.7%
assets/config-*.js 924 bytes 73.1kB 1.28%
assets/index-*.js 273 bytes 47.09kB 0.58%
assets/featured-*.js -320 bytes 29.75kB -1.06%
assets/troubleshooting-*.js 5.72kB 14.77kB 63.23% ⚠️
assets/external-*.js (New) 433 bytes 433 bytes 100.0% 🚀

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.32520% with 673 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@cf52f4b). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/virtualhid_input.cpp 30.42% 372 Missing and 51 partials ⚠️
src/confighttp.cpp 43.36% 73 Missing and 55 partials ⚠️
src/platform/windows/input.cpp 10.66% 57 Missing and 10 partials ⚠️
src/system_tray.cpp 88.16% 9 Missing and 11 partials ⚠️
src/platform/linux/input/virtualhid.cpp 53.84% 12 Missing and 6 partials ⚠️
src/platform/macos/input.cpp 54.54% 10 Missing ⚠️
src/input.cpp 0.00% 4 Missing and 1 partial ⚠️
src/config.cpp 0.00% 0 Missing and 1 partial ⚠️
src/platform/virtualhid_input.h 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5368   +/-   ##
=========================================
  Coverage          ?   29.02%           
=========================================
  Files             ?      104           
  Lines             ?    24595           
  Branches          ?    10992           
=========================================
  Hits              ?     7138           
  Misses            ?    13630           
  Partials          ?     3827           
Flag Coverage Δ
Archlinux 0.00% <0.00%> (?)
FreeBSD-amd64 13.75% <16.11%> (?)
Homebrew-macos-14 21.95% <21.30%> (?)
Homebrew-macos-15 22.58% <21.30%> (?)
Homebrew-macos-26 22.70% <21.30%> (?)
Homebrew-ubuntu-24.04 14.82% <23.43%> (?)
Linux-AppImage 14.24% <25.10%> (?)
Windows-AMD64 18.86% <28.68%> (?)
Windows-ARM64 15.95% <22.21%> (?)
macOS-arm64 19.12% <19.14%> (?)
macOS-x86_64 19.79% <19.14%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/config.h 0.00% <ø> (ø)
src/confighttp.h 100.00% <ø> (ø)
src/platform/common.h 34.37% <100.00%> (ø)
src/config.cpp 24.26% <0.00%> (ø)
src/platform/virtualhid_input.h 0.00% <0.00%> (ø)
src/input.cpp 18.02% <0.00%> (ø)
src/platform/macos/input.cpp 59.25% <54.54%> (ø)
src/platform/linux/input/virtualhid.cpp 53.84% <53.84%> (ø)
src/system_tray.cpp 77.83% <88.16%> (ø)
src/platform/windows/input.cpp 5.43% <10.66%> (ø)
... and 2 more

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf52f4b...c0e7306. Read the comment docs.

Comment thread src/confighttp.cpp Fixed
Comment thread tests/unit/test_confighttp.cpp Fixed
Comment thread tests/unit/test_confighttp.cpp Fixed
@ReenigneArcher
ReenigneArcher force-pushed the libvirtualhid branch 7 times, most recently from a3e7ed7 to fe08cf1 Compare July 15, 2026 12:30
@ReenigneArcher
ReenigneArcher force-pushed the libvirtualhid branch 14 times, most recently from c0b07b1 to 19ba419 Compare July 21, 2026 17:17
Comment thread .github/workflows/ci-linux.yml Fixed
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Last Updated 2026-08-11 19:12:44 UTC
Source Run CI Run #4934
Commit c0e73061c0da6852d82a25be088f3f4ced087276

Screenshot Comparison

PR #5368 screenshots vs screenshots baseline.

Matrix: AppImage

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

@ReenigneArcher
ReenigneArcher force-pushed the libvirtualhid branch 6 times, most recently from beab94f to 0af629e Compare August 10, 2026 19:59
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
8 New issues
3 New Code Smells (required ≤ 0)
5 New Bugs (required ≤ 0)
2 Duplicated Blocks on New Code (required ≤ 0)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment