Skip to content

Preset Shortcuts

Scr0ols edited this page Jun 5, 2026 · 4 revisions

Preset Shortcuts

Each preset can have a keyboard shortcut assigned to it. Pressing the shortcut toggles that preset on/off without opening any UI.


Shortcut format

A shortcut consists of up to 3 keys:

  • 1 trigger key — the key whose press fires the shortcut
  • Up to 2 held keys — keys that must be held down when the trigger is pressed

Examples:

  • Ctrl — press Ctrl alone
  • Ctrl+Alt — hold Ctrl, then press Alt
  • Ctrl+Alt+R — hold Ctrl and Alt, then press R

Any key can be used, including function keys, numpad keys, and modifier keys (Shift, Ctrl, Alt). There's no restriction on which keys can be held vs trigger.


Assigning a shortcut

  1. Open the Presets screen (Main screen → Presets button → Manage)
  2. Click the preset you want to configure
  3. Click the Shortcut tab in the detail panel
  4. Press the keys you want to assign:
    • Press and hold your held key(s) first
    • Then press the trigger key
    • The captured combination appears in green on screen
  5. Press Enter to confirm
  6. Press Backspace to clear the current shortcut
  7. Press Escape to cancel without saving

The assigned shortcut shows next to the preset name in the list, e.g. [Ctrl+Alt+R].


How detection works

The shortcut is checked on every game tick (client-side only):

  • If the shortcut has held keys: all held keys must be physically held via GLFW.glfwGetKey, and the trigger key must transition from released to pressed (rising edge)
  • If the shortcut has no held keys: only the trigger key's rising edge is checked

The shortcut fires once per press, not repeatedly while held.


Notes

  • Shortcuts work any time the game has focus — the SoundTweaks screen doesn't need to be open
  • If two presets share the same shortcut, both toggle simultaneously
  • Shortcuts are saved per-preset in soundtweaks_presets.json
  • The shortcut operates at the GLFW level and doesn't conflict with Minecraft's built-in keybinds, but watch out for overlap if you assign commonly used keys

Clone this wiki locally