Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 116 additions & 3 deletions source/gameplay/controls-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1023,17 +1023,130 @@ The easiest way to configure your device for use in Rigs of Rods is to use the [

![vJoyDisable](../images/vJoyDisable.png)

### On Linux to move camera or steering wheel with mouse

You will need to install Keymasq, on Debian based distros like Ubuntu / Linux Mint run this command

```
curl -fsSL https://repo.keymasq.tools/gpg-key.asc \
| sudo gpg --dearmor -o /etc/apt/keyrings/keymasq.gpg
echo "deb [signed-by=/etc/apt/keyrings/keymasq.gpg arch=all] https://repo.keymasq.tools/debian stable main" \
| sudo tee /etc/apt/sources.list.d/keymasq.list
sudo
apt update
sudo
apt install keymasq
sudo
systemctl enable --now keymasqd
systemctl
--user enable --now keymasq-session`
```
Start by clicking on "+" and selecting your mouse from the list

![6.1](../images/MoveMauseLinux-0.png)

creating new profile give it name RoR

![7](../images/MoveMauseLinux-1.png)

You will get new pop-up window, on it at bottom just enable Always grab 2 interfaces

![7.1](../images/MoveMauseLinux-2.png)

After that scroll down to Keyboard you will found that its split in to (Left) and (Right)

![7.2](../images/MoveMauseLinux-3.png)

here you will allow keys which are need for the game like UP ARROW and other inputs to go through keymasq, keymasq will not allow game to register pressed key if you do not allow them to go through.
So click on let say “c” to allow to change camera in game, on the left click on Keyboard and down on Capture Key

![7.3](../images/MoveMauseLinux-4.png)

and just press c on keyboard, repeat for UP/DOWN/LEFT/RIGHT arrows. Alternatively open `.config/keymasq/profiles/NAME_OF_YOUR_PROFILE.toml`
in your favorite text editor and add

```
[devices."YOUR_VID:PID".mapping.key_c]
action = "keyboard"
target = "key_c"

[devices."YOUR_VID:PID".mapping.key_left]
action = "keyboard"
target = "key_left"
```
Scroll down to Pointer and click Pointer Movement

![7.4](../images/MoveMauseLinux-5.png)

On Output change Mouse Movement to Controller Axes

![7.5](../images/MoveMauseLinux-6.png)

Scroll down to Axes and change Right Stick X ABS_RX to Left Stick X ABX_X

![7.6](../images/MoveMauseLinux-7.png)

Also change Vertical Axis from Right Stick Y ABS_RY to Left Stick Y ABS_Y

![7.7](../images/MoveMauseLinux-8.png)

That would be it for Keymasq click Apply and Save.

Now to test axes download and compile latest and geatest jstest-gtk with

`
git clone https://git.launchpad.net/ubuntu/+source/jstest-gtk
`

Open it and at top select keymasq-gamepad, in Keymasq enable your device and move mouse around
you should see Axis0 and Axis1 move

![7.7](../images/MoveMauseLinux-9.png)


Create new file called keymasq_gamepad.map in ~/.rigsofrods/config/ with with command

`
touch ~/.rigsofrods/config/keymasq_gamepad.map
`

and put this in to it

```
; -------------------------------------------
; Keymasq_gamepad Controller Input Map
;
; Version 0.1
; -------------------------------------------

; CAMERA
;CAMERA_ROTATE_DOWN JoystickAxis 0 1 UPPER
;CAMERA_ROTATE_UP JoystickAxis 0 1 LOWER
;CAMERA_ROTATE_LEFT JoystickAxis 0 0 LOWER
;CAMERA_ROTATE_RIGHT JoystickAxis 0 0 UPPER

; TRUCK

TRUCK_STEER_LEFT JoystickAxis 0 0 LOWER
TRUCK_STEER_RIGHT JoystickAxis 0 0 UPPER
```

if you want to control steering with mouse

Now when you click "enable" on Keymasq you will lost mouse to bring it back
just press SPACE_BAR

### Launching the tool

After downloading, extract the zip into a new folder. Then double-click `Run.bat` to launch the tool.

![5](../images/InputMappingTool-1.png)
![6.3](../images/InputMappingTool-1.png)

### Adding new inputs

To begin adding inputs, click `Add`.

![6](../images/InputMappingTool-2.png)
![6.3](../images/InputMappingTool-2.png)

Select the event you want to assign an input to. In this example, I will use `TRUCK_ACCELERATE`

Expand Down Expand Up @@ -1125,4 +1238,4 @@ If you rename the file, it is highly recommended you enable file extensions (Vie
This is to help avoid you naming the file `.map.map` by mistake.

If you've made sure your input map is named correctly and the device still doesn't function in-game,
please create a thread on the [support forum](https://forum.rigsofrods.org/forums/game-support.8/) or send a message in the #support channel on the official RoR [Discord](https://discord.gg/rigsofrods) server.
please create a thread on the [support forum](https://forum.rigsofrods.org/forums/game-support.8/) or send a message in the #support channel on the official RoR [Discord](https://discord.gg/rigsofrods) server.
Binary file added source/images/MoveMauseLinux-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/MoveMauseLinux-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.