Skip to content

Add controller 2 bindings for special game functions #2

@tmustier

Description

@tmustier

Context

Some NES games (e.g. Legend of Zelda) use controller 2 for special actions like save (Up + A on controller 2). We only map controller 1 today, so the save trick can’t be triggered without also moving/attacking on P1.

Goal

Add optional controller-2 keybindings so players can trigger special functions without interfering with P1 inputs.

Notes

  • Input system already supports multi-key combos; this is about mapping to player 2.
  • Need to choose a default P2 mapping that avoids accidental interference (e.g. use a right-hand cluster like IJKL + U/O, or use modifier-based mappings like Alt+WASD + Alt+Z/X).
  • Should be configurable in ~/.pi/nes/config.json (e.g. keybindingsP2 or players: {1,2}), with docs updated.

Tasks

  • Add controller-2 mapping support in the input handler (jsnes controller index 2).
  • Decide on a default P2 keybinding scheme that minimizes accidental overlap.
  • Add config schema + docs for P2 bindings.
  • Validate Zelda save (Up + A on controller 2) works without interfering with P1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions