Skip to content

Physical Android gamepad passthrough to PC #28

Description

@githubtefo

Hi! First, thanks for developing VirtualGamePad.
I'd like to suggest support for physical game controllers connected to the Android device as an input source.
Use case
I have a Backbone controller connected directly to my Android phone. It would be very useful if VirtualGamePad could capture the Backbone's input and forward it to the PC, effectively turning:
Backbone → Android phone → VirtualGamePad → PC
into a wireless gamepad.
This could also work with other controllers that Android already recognizes over USB or Bluetooth.
Possible implementation
Android already exposes physical controllers through its standard input APIs:
KeyEvent for buttons/D-pad
MotionEvent for analog sticks and triggers
InputDevice.SOURCE_GAMEPAD / SOURCE_JOYSTICK for identifying controller input
So, conceptually, VirtualGamePad-Mobile could translate these events into the same internal controller state currently generated by its touchscreen controls and send that through the existing VirtualGamePad protocol.
For example:
Physical controller

Android InputDevice

KeyEvent / MotionEvent

VirtualGamePad-Mobile

existing VGP_Data_Exchange

VirtualGamePad-PC
For an initial implementation, even simple 1:1 passthrough would be extremely useful:
A/B/X/Y
D-pad
L1/R1
L2/R2
Start/Select
Left/right analog sticks
Stick buttons
Controller remapping or more advanced configuration could always be added later.
Why this could be useful
Besides the Backbone use case, this would effectively allow VirtualGamePad to act as a generic Android-to-PC gamepad bridge.
For example, USB-C mobile controllers that normally require being physically attached to a phone could become wireless controllers for Linux/Windows without requiring any special support from the controller itself.
An optional "Physical controller passthrough" mode that hides/disables the touchscreen controls would probably be enough for this use case.
Would something like this fit within the scope of VirtualGamePad?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions