# Projecte 2026 - Keybinding Configuration
# Single source of truth for all key assignments.
# Code reads this at startup; HELP KEYS displays it in the console.
#
# Fields:
#   id     - Identifier used in C++ code (KeyConfig::key("SCOPE", "id"))
#   key    - Display text for HELP KEYS (human-readable)
#   code   - SDL key name for SDL_GetKeyFromName() — omit for mouse/composite entries
#   desc   - Short description (console is 256px wide)
#   action - (Optional, GLOBAL only) InputAction name to bind via Input::bindKey()

scopes:
  - name: GLOBAL
    keys:
      - id: zoom_down
        key: "F1"
        code: "F1"
        desc: "zoom down"
        action: WINDOW_DEC_ZOOM
      - id: zoom_up
        key: "F2"
        code: "F2"
        desc: "zoom up"
        action: WINDOW_INC_ZOOM
      - id: fullscreen
        key: "F3"
        code: "F3"
        desc: "fullscreen"
        action: TOGGLE_FULLSCREEN
      - id: shader
        key: "F4"
        code: "F4"
        desc: "shader on/off"
        action: TOGGLE_POSTFX
      - id: shader_preset
        key: "Shift+F4"
        desc: "next shader preset"
      - id: shader_type
        key: "Ctrl+F4"
        desc: "next shader type"
      - id: next_palette
        key: "F5"
        code: "F5"
        desc: "next palette"
        action: NEXT_PALETTE
      - id: prev_palette
        key: "Ctrl+F5"
        desc: "prev palette"
      - id: palette_sort
        key: "F6"
        code: "F6"
        desc: "palette sort mode"
        action: NEXT_PALETTE_SORT
      - id: integer_scale
        key: "F7"
        code: "F7"
        desc: "integer scale"
        action: TOGGLE_INTEGER_SCALE
      - id: music
        key: "F8"
        code: "F8"
        desc: "music on/off"
        action: TOGGLE_MUSIC
      - id: border
        key: "F9"
        code: "F9"
        desc: "border"
        action: TOGGLE_BORDER
      - id: vsync
        key: "F10"
        code: "F10"
        desc: "vsync"
        action: TOGGLE_VSYNC
      - id: pause
        key: "F11"
        code: "F11"
        desc: "pause"
        action: PAUSE
      - id: info
        key: "F12"
        code: "F12"
        desc: "show info"
        action: TOGGLE_DEBUG
      - id: screenshot
        key: "Ctrl+S"
        code: "S"
        desc: "screenshot"
        action: SCREENSHOT
      - id: console
        key: "`"
        code: "`"
        desc: "console"
        action: TOGGLE_CONSOLE
      - id: quit
        key: "Esc"
        code: "Escape"
        desc: "quit/back"
        action: EXIT

  - name: EDITOR
    keys:
      - id: toggle
        key: "9"
        code: "9"
        desc: "toggle editor"
      - id: grid
        key: "G"
        code: "G"
        desc: "toggle grid"
      - id: collision
        key: "8"
        code: "8"
        desc: "draw/collision mode"
      - id: auto_collision
        key: "C"
        code: "C"
        desc: "cycle auto-collision"
      - id: tile_picker
        key: "T"
        code: "T"
        desc: "tile picker"
      - id: eraser
        key: "E"
        code: "E"
        desc: "eraser"
      - id: minimap
        key: "M"
        code: "M"
        desc: "minimap"
      - id: nav_up
        key: "Up"
        code: "Up"
        desc: "room up"
      - id: nav_down
        key: "Down"
        code: "Down"
        desc: "room down"
      - id: nav_left
        key: "Left"
        code: "Left"
        desc: "room left"
      - id: nav_right
        key: "Right"
        code: "Right"
        desc: "room right"
      - id: cancel
        key: "Esc"
        code: "Escape"
        desc: "cancel/clear brush"

  - name: MINIMAP
    keys:
      - id: numbers
        key: "N"
        code: "N"
        desc: "room numbers"
      - id: capture
        key: "S"
        code: "S"
        desc: "capture minimap"
      - id: close_m
        key: "M"
        code: "M"
        desc: "close"
      - id: close_esc
        key: "Esc"
        code: "Escape"
        desc: "close"

  - name: DEBUG
    keys:
      - id: debug_mode
        key: "0"
        code: "0"
        desc: "debug mode"
      - id: infinite_lives
        key: "1"
        code: "1"
        desc: "infinite lives"
      - id: invincibility
        key: "2"
        code: "2"
        desc: "invincibility"
      - id: nav_up
        key: "W"
        code: "W"
        desc: "room up"
      - id: nav_left
        key: "A"
        code: "A"
        desc: "room left"
      - id: nav_down
        key: "S"
        code: "S"
        desc: "room down"
      - id: nav_right
        key: "D"
        code: "D"
        desc: "room right"
      - id: reload
        key: "R"
        code: "R"
        desc: "reload resources"
      - id: test_cheevo
        key: "3"
        code: "3"
        desc: "test achievement"
