Skip to content

Instantly share code, notes, and snippets.

@skorotkiewicz
Last active August 19, 2022 06:40
Show Gist options
  • Save skorotkiewicz/2381aa2d0a02521db1161711d27ffea6 to your computer and use it in GitHub Desktop.
Save skorotkiewicz/2381aa2d0a02521db1161711d27ffea6 to your computer and use it in GitHub Desktop.
Retropie config for Steam Controller

Here are the different signals that the Steam Controller will send for the different buttons, and what you need in your .emulationstation/es_input.cfg for EmulationStation to react to them.

Left D-PAD The left D-PAD will send "hat" signals when you just touch it, and "button" signals when you press hard enough to actually click. Use this for touch-sensitive up/down/left/right:

    <input name="up" type="hat" id="0" value="1"/>
    <input name="down" type="hat" id="0" value="4"/>
    <input name="left" type="hat" id="0" value="8"/>
    <input name="right" type="hat" id="0" value="2"/>

And use this if you want to have to click for up/down/left/right:

    <input name="up" type="button" id="17" value="-1"/>
    <input name="down" type="button" id="18" value="1"/>
    <input name="left" type="button" id="19" value="-1"/>
    <input name="right" type="button" id="20" value="1"/>

The left directional pad on the Steam Controller is SUPER sensitive, and I don't think there's a way to configure this sensitivity yet.

Left Analog Stick The left analog stick sends two "axis" signals, one for up/down the other for left/right, and a "button" signal when you click it. The configuration is:

    <input name="leftthumb" type="button" id="13" value="1"/>
    <input name="leftanalogup" type="axis" id="1" value="-1"/>
    <input name="leftanalogdown" type="axis" id="1" value="1"/>
    <input name="leftanalogleft" type="axis" id="0" value="-1"/>
    <input name="leftanalogright" type="axis" id="0" value="1"/>

Right Analog Stick (The mouse-like touchpad) EmulationStation doesn't use a mouse, but it'll happily respond to the "axis" and "button" signals you can send from the pad:

    <input name="rightthumb" type="button" id="1" value="1"/>
    <input name="rightanalogup" type="axis" id="3" value="-1"/>
    <input name="rightanalogdown" type="axis" id="3" value="1"/>
    <input name="rightanalogleft" type="axis" id="2" value="-1"/>
    <input name="rightanalogright" type="axis" id="2" value="1"/>

A, B, X, Y, Start, Select, Hotkey, Shoulders, Triggers, and Guards Set these as follows:

    <input name="a" type="button" id="2" value="1"/>
    <input name="b" type="button" id="3" value="1"/>
    <input name="x" type="button" id="4" value="1"/>
    <input name="y" type="button" id="5" value="1"/>
    <input name="start" type="button" id="11" value="1"/>
    <input name="select" type="button" id="10" value="1"/>
    <input name="hotkeyenable" type="button" id="12" value="1"/>
    <input name="leftshoulder" type="button" id="6" value="1"/>
    <input name="rightshoulder" type="button" id="7" value="1"/>
    <input name="lefttrigger" type="hat" id="0" value="4"/>
    <input name="righttrigger" type="hat" id="0" value="2"/>

The "Guards" are the buttons on the back of the Steam Controller that no other controllers seem to have (if there's another name, I'll correct this post). They don't map to anything in EmulationStation, but they have button id's of 15 and 16.

As mentioned before, the Triggers also send an analog signal before you click the button at the end of travel. I don't know that there's a use for this signal in EmulationStation yet, and there isn't a use for me specifically, so I didn't try very hard to figure out if it's a "hat" or an "axis" signal, or what the signal identifiers are.

Gyroscopic input I couldn't find a way to receive these signals in EmulationStation.

Putting it all together You might need to find your own deviceGUID, I'm not sure. Use EmulationStation to configure your controller once, map a button or two, then exit EmulationStation, and then and modify your .emulationstation/es_input.cfg config file by hand.

<inputConfig type="joystick" deviceName="Wireless Steam Controller" deviceGUID="03000000de2800004211000011010000">
    <input name="up" type="button" id="17" value="-1"/>
    <input name="down" type="button" id="18" value="1"/>
    <input name="left" type="button" id="19" value="-1"/>
    <input name="right" type="button" id="20" value="1"/>
    <input name="a" type="button" id="2" value="1"/>
    <input name="b" type="button" id="3" value="1"/>
    <input name="x" type="button" id="4" value="1"/>
    <input name="y" type="button" id="5" value="1"/>
    <input name="hotkeyenable" type="button" id="12" value="1"/>
    <input name="leftshoulder" type="button" id="6" value="1"/>
    <input name="rightshoulder" type="button" id="7" value="1"/>
    <input name="leftthumb" type="button" id="13" value="1"/>
    <input name="rightthumb" type="button" id="1" value="1"/>
    <input name="leftanalogup" type="axis" id="1" value="-1"/>
    <input name="leftanalogdown" type="axis" id="1" value="1"/>
    <input name="leftanalogleft" type="axis" id="0" value="-1"/>
    <input name="leftanalogright" type="axis" id="0" value="1"/>
    <input name="rightanalogup" type="axis" id="3" value="-1"/>
    <input name="rightanalogdown" type="axis" id="3" value="1"/>
    <input name="rightanalogleft" type="axis" id="2" value="-1"/>
    <input name="rightanalogright" type="axis" id="2" value="1"/>
    <input name="lefttrigger" type="button" id="8" value="4"/>
    <input name="righttrigger" type="button" id="9" value="1"/>
    <input name="select" type="button" id="10" value="1"/>
    <input name="start" type="button" id="11" value="1"/>
    <input name="pageup" type="button" id="6" value="1"/>
    <input name="pagedown" type="button" id="7" value="1"/>
  </inputConfig>

Thanks to wmarler! https://retropie.org.uk/forum/post/222838

// pi@retropie:~ $ cat .emulationstation/es_input.cfg
<?xml version="1.0"?>
<inputList>
<inputAction type="onfinish">
<command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
</inputAction>
<inputConfig type="joystick" deviceName="Steam Controller" deviceGUID="03000000de2800000211000011010000">
<input name="up" type="button" id="17" value="-1"/>
<input name="down" type="button" id="18" value="1"/>
<input name="left" type="button" id="19" value="-1"/>
<input name="right" type="button" id="20" value="1"/>
<input name="a" type="button" id="2" value="1"/>
<input name="b" type="button" id="3" value="1"/>
<input name="x" type="button" id="4" value="1"/>
<input name="y" type="button" id="5" value="1"/>
<input name="hotkeyenable" type="button" id="12" value="1"/>
<input name="leftshoulder" type="button" id="6" value="1"/>
<input name="rightshoulder" type="button" id="7" value="1"/>
<input name="leftthumb" type="button" id="13" value="1"/>
<input name="rightthumb" type="button" id="1" value="1"/>
<input name="leftanalogup" type="axis" id="1" value="-1"/>
<input name="leftanalogdown" type="axis" id="1" value="1"/>
<input name="leftanalogleft" type="axis" id="0" value="-1"/>
<input name="leftanalogright" type="axis" id="0" value="1"/>
<input name="rightanalogup" type="axis" id="3" value="-1"/>
<input name="rightanalogdown" type="axis" id="3" value="1"/>
<input name="rightanalogleft" type="axis" id="2" value="-1"/>
<input name="rightanalogright" type="axis" id="2" value="1"/>
<input name="lefttrigger" type="button" id="8" value="4"/>
<input name="righttrigger" type="button" id="9" value="1"/>
<input name="select" type="button" id="10" value="1"/>
<input name="start" type="button" id="11" value="1"/>
<input name="pageup" type="button" id="6" value="1"/>
<input name="pagedown" type="button" id="7" value="1"/>
</inputConfig>
</inputList>
// pi@retropie:~ $ cat /opt/retropie/configs/all/retroarch-joypads/Steam\ Controller.cfg
input_device = "Steam Controller"
input_driver = "hid"
input_a_btn = "2"
input_b_btn = "3"
input_x_btn = "4"
input_y_btn = "5"
input_up_btn = "17"
input_down_btn = "18"
input_left_btn = "19"
input_right_btn = "20"
input_l_btn = "6"
input_r_btn = "7"
input_l2_btn = "8"
input_r2_btn = "9"
input_select_btn = "10"
input_start_btn = "11"
input_enable_hotkey_btn = "12"
input_l3_btn = "13"
input_r3_btn = "1"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_l_x_minus_axis = "-0"
input_l_x_plus_axis = "+0"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"
input_r_x_minus_axis = "-2"
input_r_x_plus_axis = "+2"
input_save_state_btn = "7"
input_menu_toggle_btn = "4"
input_exit_emulator_btn = "11"
input_load_state_btn = "6"
input_reset_btn = "3"
input_state_slot_decrease_btn = "19"
input_state_slot_increase_btn = "20"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment