OKé… here is the gesticulation I had to do for mapping my joystick buttons to keyboard keys press like I want.
In EmulationStation press [F1] to open the PCFManFM window browser.
In its left menu, select “Application” and double-click on the XTerm icon to open a Linux prompt.
In the shell, type these commands to open Dosbox-X as full access mode with a working mouse pointer :
# cd /userdata/system/configs/dosbox
In the menubar, select Main > Configuration GUI.
Then in the Dosbox-X Configuration window click Configuration > Save…
Enter the filename dosboxx.conf (not dosbox-x.conf !!) and validate with OK.
And Close the Dosbox-x Configuration.
In the menubar, select Main > Mapper editor :
- click on the “virtual” keyboard button to assignate (to show it green),
- click Add
- on the gamepad/joystick press the button to map with the selected keyboard key
- repeat step 1 to 3 for each gamepad/joystick buttons.
- and click Save, then Exit
In the menubar, select Main > Quit to go back to the Linux shell.
To close the Linux shell type the command line :
In the PCFManFM window browser go to /userdata/system/configs/dosbox/ folder.
Double-click the dosboxx.conf file to edit.
And add this line in the [sdl] section :
mapperfile = mapper-sdl2.map
Save the new file content by pressing [ CTRL]+[S].
And close the file editor by pressing [CTRL]+[Q]
Close the PCFManFM window browser by pressing [CTRL]+[Q] on the keyboard.
Now when I launch a “dosbox.bat”, my gamepad emulate keyboard presses. That’s very usefull to play Doom with strafe left/strafe right as R1/L1 buttons. In Doom’s setup, this action are only available through the keyboard. It’s not settable in the joystick config.