You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update controller-autoconfiguration.md
* Added a section on how to add hotkeys to the autoconfig file.
* Enhanced the Bash script to automatically detect all autoconfig files for every GNU/Linux RetroArch release when a USB controller is plugged in.
* Fixed (repaired) a table formatting.
* Update controller-autoconfiguration.md
Improved step 3 in section "Step 2: Configure Hotkeys in RetroArch"
"Close RetroArch properly to save your hotkey assignments to the main retroarch.cfg file. On most platforms, simply exiting RetroArch saves the configuration. However, on Android, you must explicitly quit RetroArch via the menu by selecting `Main Menu` → `Quit` for your changes to be saved correctly."
@@ -273,12 +273,48 @@ If your joypad is not recognized by RetroArch even after updating the profiles,
273
273
2. Connect the controller intended for autoconfiguration. Ensure your system supports the selected connectivity method. If your joypad supports both wired and wireless connections and the initial attempt (e.g., via USB) fails, try the alternative option (e.g., Bluetooth). For example, the Nintendo Switch Pro Controller does not support USB connection on Linux 5.15 and older but does support Bluetooth.
274
274
3. For Android, run the [Android](#android) steps first.
275
275
4. Use `Settings` -> `Input` -> `RetroPad Binds` -> `Port 1 Controls` -> `Set All Controls`. If automatic mapping fails for any button (e.g., due to lack of driver support), the process will be interrupted. In case of interruption, manually map the remaining buttons, starting from the one that caused the interruption and continuing through the rest of the list.
276
-
5. If applicable, then also set the menu button binding in `Settings` -> `Input` -> `Hotkeys` -> `Menu Toggle`
7. The new profile file (also known as the autoconfig file) will be saved to your disk: [Controller profile directory]/[Controller driver]/[Device index].cfg.
279
-
8. For analog L2/R2 triggers (pressure-sensitive triggers) you must manually edit the autoconfig file (see the [Analog L2/R2 remapping](#analog-l2r2-remapping) section) due to a bug in RetroArch.
6. The new profile file (also known as the autoconfig file) will be saved to your disk: [Controller profile directory]/[Controller driver]/[Device index].cfg.
278
+
7. Proceed with the manual configuration step section below.
280
279
281
-
### Manual analog L2/R2 remapping
280
+
### Additional manual configuration steps
281
+
282
+
#### Add hotkey(s)
283
+
When using RetroArch, not all controller buttons are automatically mapped through the "Set All Controls" option. Some buttons—such as menu toggles, screenshot triggers, or other special functions—must be configured separately. Here’s a step-by-step guide to ensure all your controller buttons work as desired.
284
+
285
+
##### Step 1: Identify the Button Functions
286
+
Take a look at your physical controller to spot any special buttons that might not be auto-mapped by RetroArch. These could include:
287
+
288
+
- Buttons marked for menus, home, or guides (e.g., *Menu Toggle*).
289
+
- Extra buttons for screenshots or system functions (e.g., *Screenshot* on some Nintendo Switch Pro Controllers).
290
+
291
+
Knowing which buttons are physically present helps you decide what needs manual mapping or hotkey assignment.
292
+
293
+
##### Step 2: Configure Hotkeys in RetroArch
294
+
1. Open RetroArch and navigate to:
295
+
-`Settings` → `Input` → `Hotkeys`
296
+
2. Assign your desired button to the special function (e.g., menu toggle, screenshot).
297
+
3. Close RetroArch properly to save your hotkey assignments to the main retroarch.cfg file. On most platforms, simply exiting RetroArch saves the configuration. However, on Android, you must explicitly quit RetroArch via the menu by selecting `Main Menu` → `Quit` for your changes to be saved correctly.
298
+
299
+
##### Step 3: Transfer Hotkey Assignments to the Autoconfig File
300
+
To persist your custom mappings automatically for your controller:
301
+
302
+
1. Open your main `retroarch.cfg` and locate the relevant variable(s), e.g.:
303
+
```
304
+
input_menu_toggle_btn = "[x]"
305
+
input_screenshot_btn = "[y]"
306
+
```
307
+
The values shown are only examples and won’t work if directly copied into your autoconfig.
308
+
309
+
2. Open your controller’s autoconfig file, usually located at:
3. Append the copied hotkey lines at the very bottom of the autoconfig file.
315
+
4. Save changes.
316
+
317
+
### Analog L2/R2 remapping
282
318
RetroArch has a bug([ref1](https://github.com/libretro/RetroArch/issues/6920), [ref2](https://github.com/libretro/RetroArch/issues/16767)) that causes analog L2/R2 triggers to be incorrectly mapped as digital buttons instead of analog axes when configuring controls through the UI. This affects pressure-sensitive triggers on controllers like PlayStation 2 and later, making some games unplayable due to the lack of analog input.
283
319
284
320
To work around this issue, you need to manually edit the RetroArch config file to set the correct analog axis mappings for L2 and R2. Here's how to find the proper axis values:
@@ -322,10 +358,12 @@ Note: These variable values are examples and should not be directly copied to yo
322
358
323
359
When modifying your autoconfig file for analog triggers, it's crucial to pay attention to both variable names and values. A common oversight is focusing solely on the values while neglecting to update the variable names themselves. The `_axis` suffix is essential for ensuring proper analog functionality. Simply changing values without updating the suffix from `_btn` to `_axis` will not achieve the desired result.
324
360
325
-
####Common Pitfall
361
+
####Common Pitfall
326
362
Users often unintentionally incorporate analog variable values without properly adjusting the existing variable names to reflect their analog nature. This oversight frequently results in configuration problems within the system.
327
363
By carefully updating both the variable names and values, you can ensure that your analog triggers are correctly configured for optimal performance.
328
364
365
+
###
366
+
329
367
### Inspect the file
330
368
331
369
Without modifying anything in the original file, open it in the file in a text editor and
| Controller | Linux Kernel Version | HID Support | USB Supported | Device Index in RetroArch (USB) | Bluetooth Supported[^2]| Device Index in RetroArch (Bluetooth) | Autoconfig structure|
471
-
|-|-|-|-|-|-|-|
508
+
| Controller Version | Linux Kernel Version | HID Support | USB Supported | Device Index in RetroArch (USB) | Bluetooth Supported | Device Index in RetroArch (Bluetooth) | Autoconfig Structure |
| 5.19 | Yes | Yes | Sony Interactive Entertainment Wireless Controller | Yes | Wireless Controller | |
474
512
| 6.2.0 | Yes | Yes | Sony Interactive Entertainment Wireless Controller | Yes | Wireless Controller | |
@@ -555,13 +593,6 @@ input_product_id = "3570"
555
593
If you need to manually identify the VID:PID for your controller (for example, if RetroArch does not work as expected for you) in GNU/Linux, you can run this script:
556
594
557
595
```
558
-
#!/bin/bash
559
-
560
-
# This script helps you identify your connected USB joypad.
561
-
# It lists all USB devices, lets you select your joypad, extracts its Vendor ID and Product ID,
562
-
# converts these IDs from hexadecimal to decimal, and prints them in a configuration-ready format.
563
-
# If you skip selection, it exits gracefully.
564
-
565
596
read -p "Connect your joypad and press ENTER."
566
597
lsusb | nl -w2 -s': '
567
598
read -p "Enter the number of your joypad device (or ENTER to skip): " n
With this you can search for existing autoconfig files matching your controller. This is especially useful to find if your loaded autoconfig has commented variables which happens if there are multiple autoconfigs of the same controller.
591
667
592
668
### Mapping
593
669
@@ -624,7 +700,33 @@ input_menu_toggle_btn = "8"
624
700
625
701
Note: These variable values are examples and should not be directly copied to your configuration file.
626
702
627
-
#### Overview
703
+
#### Input types
704
+
705
+
##### Buttons (digital inputs)
706
+
707
+
* These are defined by variable names ending with `_btn` (e.g., `input_a_btn`, `input_start_btn`).
708
+
* The current RetroArch configurations have button values that ranges from `0` to `203`. However, if RetroArch does not limit the values to `203`, underlying controller hardware could offer an even wider range.
709
+
* RetroArch interprets these IDs (usually 1 for pressed, 0 for not pressed) to determine the button state.
710
+
711
+
###### D-Pad directions (special digital inputs)
712
+
713
+
* D-pad directions use variable values beginning with `h0` (e.g., `input_up_btn = "h0up"`), for certain controller drivers (e.g udev, and android, but not sdl2).
714
+
* Four `h0` variables exist (`h0up`, `h0down`, `h0left`, `h0right`) for each direction on the D-pad.
715
+
* Note: The value `h1` is used by a single controller (Nintendo_Wii_Remote_Classic_Controller.cfg).
716
+
717
+
##### Axis (analog input)
718
+
* Axis definitions use `+` and `-` to indicate positive or negative direction (e.g., full press vs. no press).
719
+
* The current RetroArch configurations have axis values that ranges from `0` to `10`. However, if RetroArch does not limit the values to `10`, underlying controller hardware could offer an even wider range.
720
+
721
+
###### Mapping variables with analog L2/R2 triggers
722
+
```
723
+
input_l2_axis = "+[x]"
724
+
input_r2_axis = "+[y]"
725
+
```
726
+
727
+
Note: These variable values are examples and should not be directly copied to your configuration file, they will not work.
728
+
729
+
#### Controller elements
628
730
629
731
##### Axes (analog inputs)
630
732
* They represent analog inputs from the controller, like joystick position (e.g., left joystick X-axis, right joystick Y-axis) or trigger pressure (e.g., L2 trigger, R2 trigger).
@@ -640,19 +742,12 @@ Note: These variable values are examples and should not be directly copied to yo
* Axis definitions use `+` and `-` to indicate positive or negative direction (e.g., full press vs. no press).
645
-
* The current RetroArch configurations have axis values that ranges from `0` to `10`. However, if RetroArch does not limit the values to `10`, underlying controller hardware could offer an even wider range.
646
-
647
-
Mapping variables with analog L2/R2 triggers:
648
-
```
649
-
input_l2_axis = "+2"
650
-
input_r2_axis = "+5"
651
-
```
652
-
653
-
Note: A common mistake These variable values are examples and should not be directly copied to your configuration file.
745
+
###### Shoulder buttons with analog variables
746
+
Give each button the same label as described by the manufacturer. Additionally:
747
+
- For analog shoulder buttons, use the manufacturer’s label **and** append the word **" Trigger"** at the end.
748
+
- For example: `input_l2_axis_label = "L2 Trigger"`
654
749
655
-
###### Label variables
750
+
###### Analog sticks
656
751
The term "Analog" is included in the variable values for the analog inputs to clearly indicate that these inputs are analog in nature.
657
752
658
753
Labels for analog thumb sticks:
@@ -667,27 +762,9 @@ input_r_y_plus_axis_label = "Right Analog Y+ (down)"
667
762
input_r_y_minus_axis_label = "Right Analog Y- (up)"
668
763
```
669
764
670
-
Labels for analog L2/R2 triggers:
671
-
```
672
-
input_l2_axis_label = "L2 Trigger"
673
-
input_r2_axis_label = "R2 Trigger"
674
-
```
675
-
676
-
##### Buttons (digital inputs)
677
-
678
-
* These are defined by variable names ending with `_btn` (e.g., `input_a_btn`, `input_start_btn`).
679
-
* The current RetroArch configurations have button values that ranges from `0` to `203`. However, if RetroArch does not limit the values to `203`, underlying controller hardware could offer an even wider range.
680
-
* RetroArch interprets these IDs (usually 1 for pressed, 0 for not pressed) to determine the button state.
681
-
682
-
###### D-Pad directions (special digital inputs)
683
-
684
-
* D-pad directions use variable values beginning with `h0` (e.g., `input_up_btn = "h0up"`).
685
-
* Four `h0` variables exist (`h0up`, `h0down`, `h0left`, `h0right`) for each direction on the D-pad.
686
-
* Note: The value `h1` is used by a single controller (Nintendo_Wii_Remote_Classic_Controller.cfg).
687
-
688
765
#### Input descriptors
689
766
690
-
The third part are *input descriptors* used by RetroArch to display the labels of the buttons as they are written on your joypad.
767
+
The third part are *input descriptors* used by RetroArch to display the labels of the buttons as they are written on your joypad. RetroArch does not automatically generate button labels; therefore, you need to manually add them to your autoconfig file.
0 commit comments