RetroPie-Setup  4.8.7
inputconfiguration.sh File Reference

input configuration script More...

Detailed Description

input configuration script

global variables

There are 5 global variables which are set to the current device being processed

DEVICE_TYPE = device type is currently either joystick, keyboard or cec DEVICE_NAME = name of the device DEVICE_GUID = SDL2 joystick GUID of the device (-1 for keyboard, -2 for cec) VENDOR_ID = the USB vendor ID of the device PRODUCT_ID = the USB product ID of the device

Interface functions

each input configuration module can have an optional function check_<filename without extension>. If this function returns 1, the module is skipped. This can be used to skip input configurations in some cases - eg to skip configuration when an existing config file is not installed.

There are 3 main interface functions for each of the input types (joystick/keyboard)

function onstart_<filename without extension>_<inputtype>() is run at the start of the input configuration

function onend_<filename without extension>_<inputtype>() is run at the end of the input configuration

Returns: None

function map_<filename without extension>_<inputtype>() is run for each of the inputs - with the following arguments

Arguments:

Returns: None