Skip to main content

Python app for assigning shortcut actions to game controllers.

Project description

MIT License PyPI version

Controller Companion

Easily map controller shortcuts to an action. The following actions are supported:

  • Kill a task by its name.
  • Execute a keyboard shortcut.
  • Execute an arbitrary console command.

Features

  • GUI and CLI options available
  • Supports a wide variety of controllers (those supported by pygame)
  • Runs on Windows, Linux and Mac
  • Auto start on system boot (windows only for now)
  • GUI app can be compiled as a 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 additionally available here for Windows, Mac and Linux. In addition for windows, an installer is available.

How to run

  • CLI and GUI versions available
  • CLI:
    • Multiple mappings 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 mappings:

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

      will result in the following mapping:

      Controller<A,B> --> Action<name: Run command "explorer.exe", target: explorer.exe, type: CONSOLE_COMMAND>
      Controller<Back,Left> --> Action<name: Shortcut "alt+f4", target: alt+f4, type: KEYBOARD_SHORTCUT>
      
    • 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

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.5.2.tar.gz (28.3 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.5.2-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: controller_companion-0.5.2.tar.gz
  • Upload date:
  • Size: 28.3 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.5.2.tar.gz
Algorithm Hash digest
SHA256 4c62aa9713e1e7ea9f1d01841f1b45761eb75d31781e5c44db6993f689e2b7a9
MD5 2d4f336d9d57a1c9efda687ea9cc60ff
BLAKE2b-256 f9c70cb7391ebd56ed11acb5aad217ca816d8c9a79b64b0435676ffdc6fb7a02

See more details on using hashes here.

Provenance

The following attestation bundles were made for controller_companion-0.5.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.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for controller_companion-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9758fe57efed8134ed90f29ce79ce1bc37d6ebac4e634182e0ded8ba5aaa2fda
MD5 5a3fbd1b8a4b45e1b329eefffd18d32d
BLAKE2b-256 58a08c765b13d8aef9969f2952afab099f1025d37e0067c42d0138444ab7e670

See more details on using hashes here.

Provenance

The following attestation bundles were made for controller_companion-0.5.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