Gamepad Core Host Python Client
August 19, 2026 ยท View on GitHub
A Windows Python CLI client for GamepadCoreHost.dll. It discovers supported Sony controllers through the Windows HID API, polls input, and demonstrates DualSense output features such as rumble, lightbar colors, and adaptive triggers.
Requirements
- Windows
- Python 3.10 or newer
- A compatible
GamepadCoreHost.dllbuild and its runtime dependencies - A supported Sony controller:
- DualShock 4
- DualSense
- DualSense Edge
The client uses only Python's standard library; no packages need to be installed.
Related Repositories
Run
Use the configured default DLL path:
python main.py
Provide a DLL path explicitly:
python main.py --dll "C:\path\to\GamepadCoreHost.dll"
Continuously discover devices and process inputs:
python main.py --loop
Useful options:
-d, --dll PATH Path to GamepadCoreHost.dll
-l, --loop Run continuous discovery and input polling
-i, --interval TIME Loop interval in seconds
--info Display native API structure details
Controller Mapping
When a controller connects, the application displays the active mapping:
| Input | Output |
|---|---|
| Cross | Heavy rumble and red light |
| Circle | Soft rumble and yellow light |
| Square | GameCube trigger effect message |
| Triangle | Stop adaptive triggers and set blue light |
| L1 | Gallop effect on L2 |
| R1 | Machine effect on R2 |
| D-pad Up | Feedback (rigid) effect on R2 |
| D-pad Down | Bow (tension) effect on R2 |
| D-pad Left | Weapon (semi) effect on R2 |
| D-pad Right | Automatic gun (buzz) effect on R2 |
Effects are applied only when a button transitions from released to pressed. Each output operation is committed through GCH_UpdateOutput.
Test
python -m unittest -v test_gamepad.py
The DLL integration test runs only when the configured DLL path exists.
Copyright
Copyright (c) 2026 valoto.games. All rights reserved.