upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/gameinput.md
diff options
context:
space:
mode:
authorДмитрий Корлодный <deusex1998@gmail.com>2026-11-25 10:54:48 +0000
committerДмитрий Корлодный <deusex1998@gmail.com>2026-11-25 10:54:48 +0000
commite6aa63b187246f62acfe249b7ac177a5ef8f7bef (patch)
treea883f07d9bde41d9707b6f23d36734e5801e65c8 /docs/gameinput.md
parentd4d969a1fdc4bf8026017ab52d0a5d03c7737be6 (diff)
docs: wrap the keyboard pad settings description
AI-assisted by Codex.
Diffstat (limited to 'docs/gameinput.md')
-rw-r--r--docs/gameinput.md16
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/gameinput.md b/docs/gameinput.md
index 3f879a6a5..089f4d928 100644
--- a/docs/gameinput.md
+++ b/docs/gameinput.md
@@ -78,10 +78,11 @@ controller-button array (`GetControllerButtonState`, indexed in SDL's `SDL_Gamep
78 78
79## Keyboard pad 79## Keyboard pad
80 80
81The title reads gamepads only, so keyboard input has to arrive as a gamepad. The shim attaches one SDL virtual gamepad named `Keyboard pad (Leonida)` and presses its buttons from the keyboard on 81The title reads gamepads only, so keyboard input has to arrive as a gamepad. The shim attaches one SDL virtual
82every poll. It then goes through the same path as a real pad: a device object, the next free player slot, readings, 82gamepad named `Keyboard pad (Leonida)` and presses its buttons from the keyboard on every poll. It then goes
83reading and device callbacks, and UI navigation derived from its buttons. It reports no rumble motors. It is on by 83through the same path as a real pad: a device object, the next free player slot, readings, reading and device
84default in the focused mode, so a player without a pad can still play; `LEONIDA_KEYBOARD_PAD=off` removes it. 84callbacks, and UI navigation derived from its buttons. It reports no rumble motors. It is on by default in the
85focused mode, so a player without a pad can still play; `LEONIDA_KEYBOARD_PAD=off` removes it.
85 86
86| key | button | 87| key | button |
87|---|---| 88|---|---|
@@ -124,9 +125,10 @@ moves away or the keyboard pad is turned off. The cursor stays visible: hiding i
124owns the game's window, which is the title's, not the shim's. 125owns the game's window, which is the title's, not the shim's.
125 126
126Keys are read with `GetAsyncKeyState`, which needs no window or message loop (SDL's keyboard is part of its video 127Keys are read with `GetAsyncKeyState`, which needs no window or message loop (SDL's keyboard is part of its video
127subsystem, which this build leaves out) and works under Wine. By default (or with `LEONIDA_KEYBOARD_PAD=1`) keys count only 128subsystem, which this build leaves out) and works under Wine. By default (or with `LEONIDA_KEYBOARD_PAD=1`), keys
128while a window of this process is in the foreground. Losing focus releases keyboard and mouse input. The cursor is read 129count only while a window of this process is in the foreground. Losing focus releases keyboard and mouse input.
129afresh on return so the right stick does not jump. Scripted presses run with or without focus for unattended runs. 130The cursor is read afresh on return so the right stick does not jump. Scripted presses run with or without focus
131for unattended runs.
130`LEONIDA_KEYBOARD_PAD=always` reads physical input whatever has focus; a console tool such as 132`LEONIDA_KEYBOARD_PAD=always` reads physical input whatever has focus; a console tool such as
131 `gameinput_probe` needs it, because its console window belongs to the terminal, not to the tool. 133 `gameinput_probe` needs it, because its console window belongs to the terminal, not to the tool.
132- Force feedback and haptics run through a fake haptic backend (`rt::gameinput::set_haptic_source`), because SDL's 134- Force feedback and haptics run through a fake haptic backend (`rt::gameinput::set_haptic_source`), because SDL's