{"id":26892425,"url":"https://github.com/kitswas/virtualgamepad-pc","last_synced_at":"2025-05-12T14:26:31.021Z","repository":{"id":183446036,"uuid":"665688650","full_name":"kitswas/VirtualGamePad-PC","owner":"kitswas","description":"Windows server for Virtual Gamepad","archived":false,"fork":false,"pushed_at":"2024-12-26T13:21:43.000Z","size":1110,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-12T14:26:20.607Z","etag":null,"topics":["game-controller","gamepad","games","qt","qt6","server","virtual-gamepad","windows"],"latest_commit_sha":null,"homepage":"https://kitswas.github.io/VirtualGamePad-PC/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kitswas.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-12T19:11:44.000Z","updated_at":"2025-02-11T19:15:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c564d583-62c1-4f59-87e1-f6484ca253d9","html_url":"https://github.com/kitswas/VirtualGamePad-PC","commit_stats":null,"previous_names":["kitswas/virtualgamepad-pc"],"tags_count":2,"template":false,"template_full_name":"kitswas/CPP-project-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2FVirtualGamePad-PC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2FVirtualGamePad-PC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2FVirtualGamePad-PC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2FVirtualGamePad-PC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitswas","download_url":"https://codeload.github.com/kitswas/VirtualGamePad-PC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754460,"owners_count":21958866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-controller","gamepad","games","qt","qt6","server","virtual-gamepad","windows"],"created_at":"2025-03-31T22:51:09.930Z","updated_at":"2025-05-12T14:26:30.992Z","avatar_url":"https://github.com/kitswas.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VirtualGamePad Server\n\n[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/kitswas/VirtualGamePad-PC/total)](https://github.com/kitswas/VirtualGamePad-PC/releases/latest)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kitswas_VirtualGamePad-PC\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kitswas_VirtualGamePad-PC)\n\nThis is a part of [the VirtualGamePad project](https://kitswas.github.io/VirtualGamePad/).  \nThe source is available at \u003chttps://github.com/kitswas/VirtualGamePad-PC\u003e.\n\n## History of the server's development\n\n1. The server was orginally writen in C++.\n2. Then I rewrote it in Rust with [windows-rs](https://github.com/microsoft/windows-rs) for Rust's memory safety and the newer Gamepad injection Windows support.\n3. [Windows.UI.Input.Preview.Injection](https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.preview.injection?view=winrt-22621), as the name says, is in preview and is [buggy](https://github.com/microsoft/microsoft-ui-xaml/issues/8639). _(Read unusable)_  \nI, unfortunately, didn't know the source of the problems and decided to rewrite the app according to the Microsoft recommended way for Windows Apps (C# with WinUI 3 and the Windows App SDK).  \nThis is also when I figured that a GUI is worth the effort.\n4. Finally, due to the aforementioned reasons, this was created in C++ with the Win32 API and Qt6 for the UI.\n\n## How it works\n\n1. A socket connection is established between the client and the server.\n\n2. The server uses [the SendInput() function](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput) to synthesize keystrokes, mouse motions, and button clicks depending on the input from the client.  \nIt has the following implications:\n    - The virtual gamepad is not limited to games. You can use the virtual gamepad to control any application on the computer.\n    - Games that use DirectInput or XInput do not recognize input from the virtual gamepad as gamepad input but as keyboard and mouse input. If required, the controls have to be remapped in the game.\n\n3. The buttons on the virtual gamepad are mapped to the keyboard keys and mouse actions using the maps at src/networking/executor.hpp.  \n**Note: The right analog thumbstick is mapped to the mouse, not the arrow keys.**  \nUser defined maps are partially supported.\n\n## Build Instructions\n\n### Prerequisites\n\n- [Qt 6.5](https://www.qt.io/download-open-source)\n- [CMake](https://cmake.org/download/)\n\n### Cloning and Building\n\nClone the repository and submodules.\n\n```bash\ngit clone --recurse-submodules https://github.com/kitswas/VirtualGamePad-PC.git\n```\n\nOpen the project (open the CMakeLists.txt file in the project root) in Qt Creator and build it.\n\n### Code Formatting\n\nThis project uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) for code formatting.  \nIt includes a PowerShell script to format the code. Run\n\n```bash\n./code-lint.ps1\n```\n\nfrom the project root to format the code.  \n**Note: This script requires clang-format to be installed and available in the PATH.**\n\n### Generating Documentation\n\nThis project uses [Doxygen](https://www.doxygen.nl/index.html) to generate documentation.  \nIf Doxygen is available on your system,  \nYou can generate the documentation by running the following command:\n\n```bash\ndoxygen Doxyfile\n```\n\nThis repository has automated workflow via Github Actions.  \nDocumentation is auto-generated and deployed to Github Pages.  \nDisable Actions on your own copy or delete the [workflows](./.github/workflows) folder if you do not want to be billed. This is **not my responsiblity.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitswas%2Fvirtualgamepad-pc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitswas%2Fvirtualgamepad-pc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitswas%2Fvirtualgamepad-pc/lists"}