Droidpad gamepad
Simple server that lets you use DroidPad as a game controller on Linux and Windows.
It currently supports:
- WebSocket transport
- Bluetooth RFCOMM transport
- Linux virtual controller output through
evdev - Windows output through ViGEmBus by default
- Windows
vJoybackend - Double-tap-to-hold button handling
- rust
pkg-config(build time)libevdevdbusBlueZ(for Bluetooth transport)
libayatana-appindicatorgtk3vulkan-loaderwayland/libX11libxkbcommonfontconfig/freetypeopensslalsa-libxdotool(for tray functionality)curlglib/gdk-pixbuf/atk/pangolibGL
To allow Droidpad to create a virtual controller without running as root, you need to install the provided udev rule:
sudo cp res/99-droidpad-gamepad.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm triggerdroidpad-gamepadThe server listens on port 1715 by default.
droidpad-gamepad --port 1715
droidpad-gamepad --double-tap-timing 200 --double-tap-postfix _dthWebSocket is the default transport:
droidpad-gamepad --transport wsBluetooth uses RFCOMM:
droidpad-gamepad --transport bluetoothOn Linux you can also choose the RFCOMM channel:
droidpad-gamepad --transport bluetooth --bt-channel 3ViGEmBus is the default backend.
To select the vJoy backend at runtime on Windows:
droidpad-gamepad --backend vjoy --vjoy-device 0You can build and run Droidpad Gamepad as a Flatpak.
flatpakflatpak-builder
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak-builder --user --install --install-deps-from=flathub --force-clean build flatpak/io.github.tofixrs.droidpad-gamepad.yamlIf you are using the Nix devShell, you can simply run:
flatpak-buildflatpak run io.github.tofixrs.droidpad-gamepad{
inputs = {
droidpad-gamepad = {
url = "git+https://github.com/Tofixrs/droidpad-gamepad.git";
inputs.nixpkgs.follows = "nixpkgs";
}
};
}# cachix
{
nix.settings = {
substituters = ["https://tofix-cache.cachix.org"];
trusted-public-keys = ["tofix-cache.cachix.org-1:myU8xgZK0u4kkBPCBAlLH/8wCzw5Gn6OYpit6OsAhjU="];
};
}You can use the provided NixOS module to install the package and automatically set up the udev rules.
{ inputs, ... }: {
imports = [ inputs.droidpad-gamepad.nixosModules.default ];
services.droidpad-gamepad.enable = true;
}