A small python3 programm to map shell commands and python3 code to your controller through the inputs library
- Grab the latest version of Command Mapper from the releases tab and unzip it to a folder
- Install python 3 (i use python 3.9) and execute pip install -r requirements.txt
- Now simply run the programm with python main.py
You can edit your bindings in the inputs.json file
When a command starts with (@PY) it will be executed as python 3 code else it will be executed as a shell command.
Button Name | XBox One |
---|---|
BTN_SOUTH | A |
BTN_NORTH | Y |
BTN_WEST | X |
BTN_EAST | B |
BTN_SELECT | Bottom right of XBox Logo |
BTN_START | Bottom left of XBox Logo |
BTN_THUMBR | Right thumbstick click |
BTN_THUMBL | Left thumbstick click |
BTN_TR | RB |
BTN_TL | LB |
ABS_HAT0Y | DPad up and down |
ABS_HAT0X | DPad left and right |
{
"BTN_SOUTH": [
"git init",
"(@PY)print(\"South\")"
],
"BTN_WEST": [
"(@PY)print(\"West\")"
]
}
Inputs by zeth used to acces the controller inputs: https://github.com/zeth/inputs