Skip to content

Commit e7bb0fc

Browse files
authored
xboxdrv: fix broken PostIMG image link
1 parent 83ab33e commit e7bb0fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/Universal-Controller-Calibration-&-Mapping-Using-xboxdrv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ chmod +x /opt/retropie/configs/all/runcommand-onstart.sh
274274

275275
Notice that our entry begins with a sudo command to kill any other instances of xboxdrv. This is in case you have already configured your controller with a system-wide mapping from the earlier steps. We'll go over later how to re-enable that system-wide mapping automatically when the emulator shuts down so that you will be left where you started. If you have no system-wide mapping, the basic controls you have set up in Emulation Station will return once the emulator quits without any further setting. For this particular mapping, we have enabled mouse support to the left joystick, mouse left and right buttons to controller buttons 'b' and 'a', as well as mapping the 'F5' key to the controller's 'start' button so that we can bring up the menu and control the entire software from the controller. To do this, we added two new lines to our basic configuration in the form of `--ui-axismap` and `--ui-buttonmap`.
276276

277-
This particular example works well for mapping a controller's left analog stick to mouse support using the `--ui-axismap` variable and can be changed to the right stick by simply altering the line to `--ui-axismap x2=REL_X:10,y2=REL_Y:10`. To change the speed of the mouse, just change the `REL_[•]:[•]` integer of the X and Y axis higher or lower than `10`. If you should ever want to map keyboard keys to an analog stick, a classic example would look like `--ui-axismap X1=KEY_A:KEY_D,Y1=KEY_W:KEY_S`, giving you the ADWS control scheme found in many classic computer titles. As far as key-mapping buttons is concerned, first you must consider which buttons are available to you. Seeing as how xboxdrv emulates a standard XBox 360 controller, you will have any of those buttons that you have already assigned to your controller in the earlier steps. If you have assigned all the buttons that are possible, you'll have access to a,b,x,y,lb,rb,lt,rt,tl,tr,start,back and guide. The placement of these buttons can be seen [here](https://s32.postimg.org/zcs0wosth/xbox.jpg). By using the `--ui-buttonmap` variable, you can then map any one of the buttons to a key using the format above. To discover all the possible keyboard keys that are available to you, type `/opt/retropie/supplementary/xboxdrv/bin/xboxdrv --help-key`. Finally, you'll notice that their are two more lines added with the `--ui-axismap` and `--ui-buttonmap` variables that are solely responsible for voiding the unused control elements. This is optional, but it will make the control scheme cleaner by eliminating the possibility of those elements conflicting in any way.
277+
This particular example works well for mapping a controller's left analog stick to mouse support using the `--ui-axismap` variable and can be changed to the right stick by simply altering the line to `--ui-axismap x2=REL_X:10,y2=REL_Y:10`. To change the speed of the mouse, just change the `REL_[•]:[•]` integer of the X and Y axis higher or lower than `10`. If you should ever want to map keyboard keys to an analog stick, a classic example would look like `--ui-axismap X1=KEY_A:KEY_D,Y1=KEY_W:KEY_S`, giving you the ADWS control scheme found in many classic computer titles. As far as key-mapping buttons is concerned, first you must consider which buttons are available to you. Seeing as how xboxdrv emulates a standard XBox 360 controller, you will have any of those buttons that you have already assigned to your controller in the earlier steps. If you have assigned all the buttons that are possible, you'll have access to a,b,x,y,lb,rb,lt,rt,tl,tr,start,back and guide. The placement of these buttons can be seen [here](https://user-images.githubusercontent.com/580022/45268303-10a03e80-b4ce-11e8-883c-1f586566c040.png). By using the `--ui-buttonmap` variable, you can then map any one of the buttons to a key using the format above. To discover all the possible keyboard keys that are available to you, type `/opt/retropie/supplementary/xboxdrv/bin/xboxdrv --help-key`. Finally, you'll notice that their are two more lines added with the `--ui-axismap` and `--ui-buttonmap` variables that are solely responsible for voiding the unused control elements. This is optional, but it will make the control scheme cleaner by eliminating the possibility of those elements conflicting in any way.
278278

279279
Now we need to ensure that or xboxdrv mapping is torn down as the emulator/port exits back to Emulation station. We'll do this by adding `sudo killall >> /dev/shm/runcommand.log 2>&1 xboxdrv` to `/opt/retropie/configs/all/runcommand-onend.sh`. Also, for those who have a system-wide xboxdrv mapping that should be restored afterward, we'll copy the same configuration from your `/etc/rc.local` to '/opt/retropie/configs/all/runcommand-onend.sh' as well. If the `runcommand-onend.sh` file doesn't exist yet, drop to the command line and type:
280280

0 commit comments

Comments
 (0)