Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gamepad Manager

A system tray application for monitoring wireless game controller battery levels on Windows.

Features

  • Real-time Controller Monitoring: Automatically detects connected controllers (Xbox, PlayStation, Nintendo, etc.)
  • Battery Status: Shows battery levels for wireless controllers in the system tray
  • Controller Events Viewer: Click on any controller to open a detailed events window showing:
    • Button presses and releases
    • Analog stick movements (left/right stick)
    • Trigger positions (LT/RT)
    • D-pad input
    • Real-time visual indicators for all inputs

Project Structure

app/
├── main.py
├── tray/
│   ├── tray_icon.py
│   └── menu_builder.py
├── ui/
│   └── events_window.py
├── controllers/
│   ├── batteryprovider.py
│   └── detector.py
├── platform/
│   ├── windows.py
│   ├── linux.py
│   └── macos.py
├── workers/
│   ├── poller.py
│   └── input_monitor.py
└── models/
    └── controller.py

Installation

  1. Clone the repository
  2. Install dependencies:
pip install -r requirements.txt

Running

python main.py

Build Executable (PyInstaller)

  1. Install PyInstaller:
pip install pyinstaller
  1. Build using the existing spec file:
pyinstaller main.spec
  1. The generated executable will be available in:
  • dist/main/main.exe
  1. (Optional) Build directly from main.py without the spec file:
pyinstaller --name gamepad-manager --noconfirm --windowed main.py
  1. To remove previous build artifacts before rebuilding:
rmdir /s /q build dist

Usage

  1. Run the application - it will appear in the system tray
  2. Connected controllers will be listed in the tray menu with their battery status
  3. Click on any controller to open the Events Viewer window
  4. In the Events Viewer:
    • Click "Start Monitoring" to begin capturing controller inputs
    • View real-time button presses, stick movements, and trigger positions
    • See visual indicators for all analog inputs
    • Monitor the events log for detailed input history
    • Click "Clear Log" to reset the events display
    • Click "Stop Monitoring" when done

Troubleshooting

ImportError: Unable to load hidapi libraries

Error message:

ImportError: Unable to load any of the following libraries:libhidapi-hidraw.so libhidapi-hidraw.so.0 libhidapi-libusb.so libhidapi-libusb.so.0 libhidapi-iohidmanager.so libhidapi-iohidmanager.so.0 libhidapi.dylib hidapi.dll libhidapi-0.dll

Solution:

This error occurs when the hidapi package is not properly installed with the native Windows DLL. To fix it:

  1. Uninstall conflicting packages:
pip uninstall -y hid hidapi
  1. Reinstall hidapi with fresh download to ensure the Windows wheel is installed:
pip install --no-cache-dir hidapi
  1. Verify the installation:
python -c "import hid; print('hidapi loaded successfully!')"

The Windows wheel (.whl) includes the necessary hidapi.dll file. Using --no-cache-dir ensures you download the correct version for your platform

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages