Skip to content

03 07 Config hotkeys

evets17 edited this page Mar 15, 2026 · 2 revisions

03 07 Config hotkeys

This page explains input hotkeys in Sprint Boost.

Why hotkeys are useful

Hotkeys let you trigger actions quickly from controller combinations.

Common uses:

  • pause/reset/quit shortcuts
  • temporary overlay show/hide
  • layout switching
  • opening menus

Where hotkeys can be used

Hotkeys are relevant for:

  • boost_mode = "enhanced"

In current Sprint Boost behavior, hotkeys are part of the enhanced input/runtime path.

Basic hotkey example

[[input.hotkeys.binding]]
keys = ["C1_5", "C1_ACTION_RIGHT"]
on_release = { command = "emulator_command", value = "PAUSE" }
menu_enabled = false
duration_ms = 200

Hotkey fields

Each binding is defined with:

  • keys (one key or combo)
  • one or more actions (on_press, on_release, on_short_release)
  • duration_ms (timing threshold)
  • menu_enabled (whether it can fire while menu is open)

Timing behavior

  • duration_ms = 0 means immediate edge behavior
  • on_press fires when combo is pressed (or after hold threshold)
  • on_release fires on release (often used for held behavior)
  • on_short_release fires when released before threshold

Common commands (hotkeys)

Common hotkey commands:

  • emulator_command → args: value (required)
  • show_menu → args: menu (required)
  • close_menu → args: none
  • switch_layout → args: layout (required)
  • toggle_layout → args: layout (required)
  • show_layout → args: layout (required)
  • hide_layout → args: none
  • set_game_info → args: game_info (required), value (required), min_value (optional), max_value (optional)
  • offset_game_info → args: game_info (required), value (required), min_value (optional), max_value (optional)
  • save_play_stats → args: none

Examples:

[[input.hotkeys.binding]]
keys = ["C1_ACTION_LEFT", "C1_ACTION_RIGHT"]
on_press = { command = "show_layout", layout = "secondary_layout_default" }
on_release = { command = "hide_layout" }
menu_enabled = true
duration_ms = 0

[[input.hotkeys.binding]]
keys = ["C1_8"]
on_press = { command = "switch_layout", layout = "fullscreen16x9" }
duration_ms = 0

[[input.hotkeys.binding]]
keys = ["C0_RESET"]
menu_enabled = true
duration_ms = 3000
on_short_release = { command = "emulator_command", value = "RESET" }
on_release = { command = "emulator_command", value = "QUIT" }

What these examples do:

  • C1_ACTION_LEFT + C1_ACTION_RIGHT

    • Press: shows secondary_layout_default
    • Release: hides that layout
    • Practical effect: hold-to-view temporary overlay aid
  • C1_8

    • Press: switches active base layout to fullscreen16x9
    • Practical effect: one-button layout switch
  • C0_RESET (short vs long press dual-command)

    • duration_ms = 3000 sets a 3-second split threshold
    • Short release (< 3s): sends RESET
    • Long release (>= 3s): sends QUIT
    • Practical effect: one physical input can safely provide two different actions

Override behavior

Hotkeys follow config precedence with normalized combo identity.

Practical effect:

  • Game-level hotkeys can replace inherited combo behavior
  • Same combo defined later overrides earlier definition

To disable an inherited combo, redefine that combo with the same keys and no actions.

Example (disable inherited hold-to-show secondary overlay because those lower action buttons interfere with gameplay for a given game):

[[input.hotkeys.binding]]
keys = ["C1_ACTION_LEFT", "C1_ACTION_RIGHT"]

This keeps the combo reserved in this config layer but removes inherited actions for that combo.

Hotkeys vs open menu navigation

When a menu is open, keys used for menu navigation are owned by the menu system.

Practical effect:

  • Those navigation keys will not fire hotkeys while the menu is open.
  • After you hide/close the menu, those hotkeys can fire again normally.

Practical tips

  • Keep a small set of memorable combos.
  • Reserve one combo for pause/menu control.
  • For emulator_command = "PAUSE", prefer on_release so the full button press/release completes before pause state is entered.
  • Use hold/release behavior only when needed.
  • Test hotkeys with and without menus open.

Next step

Continue to:

Clone this wiki locally