blob: 3f16465b32733c65e9217ac50511d86f917a7400 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# vrising-camera
This Python script rotates the camera in V-Rising using the Q and E keys on Linux because the game doesn't support bindings that rotate the camera. It uses `uinput` to emulate a right click and drag.
## Usage
Your user must be part of the input group.
```
sudo usermod -aG input $USER
```
Log out/in, then run the script.
```
./vrising-cam.py
```
### Options
| Flag | Meaning |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `--speed N` | rotation speed in relative X units per second (default `2000`) |
| `--tick-ms N` | milliseconds between motion ticks (default `1.0`; lower = smoother, higher = lighter) |
| `--ease SECONDS` | ramp speed up over `SECONDS` on press and decay on release (`0` = off; try `0.15`) |
| `--invert` | swap the rotation direction of Q and E |
| `-v`, `--verbose` | log key presses/releases, RMB injection, measured motion rate |
| `--test-rmb [SECONDS]` | self-test: hold the injected RMB for `SECONDS` (default 3) and read events back from the kernel; no keyboard needed |
| `--check` | show detected keyboards, uinput and grab status, then exit |
## Setup on Arch (KDE Wayland / X11 alike)
1. Your user needs to read the keyboard event devices and, on Arch, that same
group membership also grants write access to `/dev/uinput`:
```
sudo usermod -aG input $USER # log out and back in afterwards
```
(Arch autoloads the `uinput` module on first open; no udev rules needed.)
2. The script auto-creates `.venv` and installs `evdev` on first run — no
extra steps.
3. Run `./vrising-cam.py --check` — it should print `READY`:
`/dev/uinput` openable, your keyboards listed exposing Q+E, and no
"exclusively grabbed" warnings.
Troubleshooting when something does fail — the script prints a targeted hint:
`/dev/uinput` unwritable (rare on Arch; sudo or a udev rule fixes it), module
missing (`modprobe uinput` then add it to `/etc/modules-load.d/`), or
keyboards unreadable (the `input` group again).
|