diff options
| author | Дмитрий Корлодный <deusex1998@gmail.com> | 2026-11-25 10:54:48 +0000 |
|---|---|---|
| committer | Дмитрий Корлодный <deusex1998@gmail.com> | 2026-11-25 10:54:48 +0000 |
| commit | e6aa63b187246f62acfe249b7ac177a5ef8f7bef (patch) | |
| tree | a883f07d9bde41d9707b6f23d36734e5801e65c8 /docs/gameinput.md | |
| parent | d4d969a1fdc4bf8026017ab52d0a5d03c7737be6 (diff) | |
docs: wrap the keyboard pad settings description
AI-assisted by Codex.
Diffstat (limited to 'docs/gameinput.md')
| -rw-r--r-- | docs/gameinput.md | 16 |
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 | ||
| 81 | The 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 | 81 | The title reads gamepads only, so keyboard input has to arrive as a gamepad. The shim attaches one SDL virtual |
| 82 | every poll. It then goes through the same path as a real pad: a device object, the next free player slot, readings, | 82 | gamepad named `Keyboard pad (Leonida)` and presses its buttons from the keyboard on every poll. It then goes |
| 83 | reading and device callbacks, and UI navigation derived from its buttons. It reports no rumble motors. It is on by | 83 | through the same path as a real pad: a device object, the next free player slot, readings, reading and device |
| 84 | default in the focused mode, so a player without a pad can still play; `LEONIDA_KEYBOARD_PAD=off` removes it. | 84 | callbacks, and UI navigation derived from its buttons. It reports no rumble motors. It is on by default in the |
| 85 | focused 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 | |||
| 124 | owns the game's window, which is the title's, not the shim's. | 125 | owns the game's window, which is the title's, not the shim's. |
| 125 | 126 | ||
| 126 | Keys are read with `GetAsyncKeyState`, which needs no window or message loop (SDL's keyboard is part of its video | 127 | Keys are read with `GetAsyncKeyState`, which needs no window or message loop (SDL's keyboard is part of its video |
| 127 | subsystem, which this build leaves out) and works under Wine. By default (or with `LEONIDA_KEYBOARD_PAD=1`) keys count only | 128 | subsystem, which this build leaves out) and works under Wine. By default (or with `LEONIDA_KEYBOARD_PAD=1`), keys |
| 128 | while a window of this process is in the foreground. Losing focus releases keyboard and mouse input. The cursor is read | 129 | count only while a window of this process is in the foreground. Losing focus releases keyboard and mouse input. |
| 129 | afresh on return so the right stick does not jump. Scripted presses run with or without focus for unattended runs. | 130 | The cursor is read afresh on return so the right stick does not jump. Scripted presses run with or without focus |
| 131 | for 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 |