# Controls Input comes from the first SDL3 gamepad, the keyboard and the mouse, merged into one Switch controller (`runtime/input_win.c`). Buttons are ORed; each stick takes the source with the larger deflection. Keys and mouse buttons count only while the game window is in the foreground. `TOTK_INPUT=none` disables both (automated runs). `TOTK_*` settings can also be set in `totk.ini` next to `totk.exe` (`input = none`, `motion = 0`, `rumble = 0`); the environment overrides the file. `TOTK_RUMBLE_STRENGTH` is the rumble strength in percent (0 to 300, default 130; 0 is the same as `rumble = 0`). `TOTK_RUMBLE_CURVE` is the exponent applied to the amplitude before the strength (0.2 to 1.5, default 0.6; lower makes weak pulses stronger, 1 is linear). `TOTK_RUMBLE_TRIGGERS=1` also drives the impulse triggers of an Xbox pad. | Switch | Gamepad (by position) | Keyboard and mouse | Action in the world | |---|---|---|---| | Left stick | left stick | W A S D | move | | Right stick | right stick | mouse; arrow keys as a second source | camera | | Y | west | left mouse button | attack | | ZL | left trigger (over 50%) | right mouse button, Z | shield, lock on | | ZR | right trigger (over 50%) | F, X | bow | | X | north | Space | jump | | B | south | Left Shift | run, cancel | | A | east | E | interact, pick up | | L | left shoulder | Q | abilities | | R | right shoulder | R | throw weapon | | Left stick click | left stick click | Left Ctrl | crouch | | Right stick click | right stick click | C | first-person view | | D-pad left, up, right, down | D-pad | 1 2 3 4 | quick-select | | Plus | Start | Tab | menu, inventory | | Minus | Back | M | map | Esc is unbound in the game; it opens the settings menu and releases the mouse cursor (see Mouse camera). Z and X duplicate ZL and ZR so menu pages turn with two neighbouring keys; the menu tabs (L, R) are Q and R. The mouse wheel is unbound. The bindings are two tables in `runtime/input_map.c`, `input_bindings` (platform-neutral key ids) and `input_pad_bindings` (gamepad inputs by position); `runtime/input_win.c` translates Win32 virtual keys and SDL buttons, so a remapping page can edit both later. ## Window keys | Key | Gamepad | Action | |---|---|---| | F1 or Esc | Minus and Plus together | open or close the settings menu; the game gets no input while it is open | | F10 | | performance overlay: off, frame rate, full panel | | F11 | | borderless fullscreen on or off, saved to `totk.ini` | The Minus+Plus combo never reaches the game. In the menu the arrow keys, the D-pad or the left stick move, Enter or A selects, Q and E or L and R switch tabs, Esc or B goes back (Switch button names, as in the table above). ## Remapping `totk.ini` rebinds the buttons, one line per Switch button: `bind_