Skip to main content

Python app for assigning shortcut actions to game controllers.

Project description

MIT License PyPI version

Controller Companion

Easily create controller shortcuts to perform actions on your computer, such as using the controller to quit a game (that does not have a quit option), control the volume, or toggle full screen.

The following actions are supported

  • Terminate a task by its name.
  • Execute a keyboard shortcut.
  • Execute any console command.

Features

  • GUI and CLI options available
  • Supports a wide range of controllers (those supported by pygame)
  • Runs on Windows, Linux and Mac
  • Autostart app on system startup (Windows only for now)
  • GUI app can be compiled as standalone executable (using PyInstaller)

Screenshots

Main Window

demo

Create a new shortcut

demo

How to install

  • Using pip:
    pip install controller-companion
    
  • For the GUI version, executables are also available here for Windows, Mac and Linux. An installer is also available for Windows.

How to run

  • CLI and GUI versions available
  • CLI:
    • Multiple shortcuts can be created.

    • One or multiple input controller key combination that triggers an action can be defined using --input. The keys of one individual input combination are separated by commas, while each distinct input combination is separated by a space.

    • One or multiple actions can be defined using either --task-kill, --console or --shortcut. These actions will be mapped to the previously defined controller --input key combinations in the order --task-kill, --console and finally --shortcut

    • Example with 2 shortcuts:

      controller_companion --input A,B Back,Left --console explorer.exe --shortcut alt+f4
      

      will result in the following mapping:

      ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━┓
      ┃ Name                       ┃ Shortcut  ┃ Action       ┃ Type ┃
      ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━┩
      │ Run command "explorer.exe" │ A+B       │ explorer.exe │ Xbox │
      │ Shortcut "alt+f4"          │ Back+Left │ alt+f4       │ Xbox │
      └────────────────────────────┴───────────┴──────────────┴──────┘
      
    • Run controller_companion --help to see all available arguments

Build Executable

With poetry installed, run the following command to build the executable using PyInstaller:

poetry run build_controller_companion_executable

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

controller_companion-0.7.2.tar.gz (416.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

controller_companion-0.7.2-py3-none-any.whl (430.2 kB view details)

Uploaded Python 3

File details

Details for the file controller_companion-0.7.2.tar.gz.

File metadata

  • Download URL: controller_companion-0.7.2.tar.gz
  • Upload date:
  • Size: 416.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for controller_companion-0.7.2.tar.gz
Algorithm Hash digest
SHA256 53ea2f1af64eae6da0330ce33a847dd2a931f3b6200593ede157fbb0431e243a
MD5 009957d995423431014ae607d61aca07
BLAKE2b-256 87f4bbc27f5d32f97e648c5bada4c241118cb868ff7f063fa43d3021fbdb9349

See more details on using hashes here.

Provenance

The following attestation bundles were made for controller_companion-0.7.2.tar.gz:

Publisher: publish_pypi.yaml on Johannes11833/controller-companion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file controller_companion-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for controller_companion-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f4046864984237a5d7b6a2d4c8c30680501867a45e2f4eaaf478c14b5b6647f
MD5 4841b646e6f3cfb2ece20a5944680887
BLAKE2b-256 4ab35a88b43270cf7b060886afcacc6f7c9d6b7dd677ab726ab9320a81a94df5

See more details on using hashes here.

Provenance

The following attestation bundles were made for controller_companion-0.7.2-py3-none-any.whl:

Publisher: publish_pypi.yaml on Johannes11833/controller-companion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page