Python app for assigning shortcut actions to game controllers.
Project description
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
Create a new shortcut
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,--consoleor--shortcut. These actions will be mapped to the previously defined controller--inputkey combinations in the order--task-kill,--consoleand finally--shortcut -
Example with 2 shortcuts:
controller_companion --input A,B Back,Left --console explorer.exe --shortcut alt+f4will 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 --helpto 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
- Gamepad button icons (Xbox & PlayStation): https://80.lv/articles/free-button-icons-for-unreal-engine-and-unity
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file controller_companion-0.7.6.tar.gz.
File metadata
- Download URL: controller_companion-0.7.6.tar.gz
- Upload date:
- Size: 418.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cff926d2cec8589ab5a7d3d98f13c752b78e5b12d77a4387a08f42a8ad2ed75
|
|
| MD5 |
e61ba221dca69b6a163e07bc125024d2
|
|
| BLAKE2b-256 |
67854c08f667e306f066268fa109edbc26f52d601a01c8f4d302927c3829ed90
|
Provenance
The following attestation bundles were made for controller_companion-0.7.6.tar.gz:
Publisher:
publish_pypi.yaml on Johannes11833/controller-companion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
controller_companion-0.7.6.tar.gz -
Subject digest:
4cff926d2cec8589ab5a7d3d98f13c752b78e5b12d77a4387a08f42a8ad2ed75 - Sigstore transparency entry: 161483831
- Sigstore integration time:
-
Permalink:
Johannes11833/controller-companion@3e73aa6d7e5965ce3bb52fc886cf8878870c3aec -
Branch / Tag:
refs/tags/v0.7.6 - Owner: https://github.com/Johannes11833
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yaml@3e73aa6d7e5965ce3bb52fc886cf8878870c3aec -
Trigger Event:
push
-
Statement type:
File details
Details for the file controller_companion-0.7.6-py3-none-any.whl.
File metadata
- Download URL: controller_companion-0.7.6-py3-none-any.whl
- Upload date:
- Size: 433.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
148d14ff01a160f36d2c5b96586dd38b8b5fc6be361ac2231abd7b7d372afb88
|
|
| MD5 |
d58af90ee4d86c56dddf939db7d9da97
|
|
| BLAKE2b-256 |
43343fb48a1bd582418a5e222d16496a9cec36aa8097169853d0dc4aef0c87d0
|
Provenance
The following attestation bundles were made for controller_companion-0.7.6-py3-none-any.whl:
Publisher:
publish_pypi.yaml on Johannes11833/controller-companion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
controller_companion-0.7.6-py3-none-any.whl -
Subject digest:
148d14ff01a160f36d2c5b96586dd38b8b5fc6be361ac2231abd7b7d372afb88 - Sigstore transparency entry: 161483832
- Sigstore integration time:
-
Permalink:
Johannes11833/controller-companion@3e73aa6d7e5965ce3bb52fc886cf8878870c3aec -
Branch / Tag:
refs/tags/v0.7.6 - Owner: https://github.com/Johannes11833
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yaml@3e73aa6d7e5965ce3bb52fc886cf8878870c3aec -
Trigger Event:
push
-
Statement type: