Skip to content

Support lossless extension shortcut sequences #645

Description

@effortprogrammer

Motivation

Extensions can currently register single-key shortcuts, but they cannot safely own a multi-key sequence such as Ctrl+X, then Down.

This matters for subagent tooling: users can see that child agents are running, but an extension needs a conflict-safe way to open an inspection surface without replacing Senpi's existing Ctrl+X copy behavior.

Requested behavior

  • Add a public extension API for ordered shortcut sequences.
  • Use a 2,000 ms leader window by default.
  • Let extensions provide an optional availability predicate.
  • Replay buffered input exactly once on timeout or mismatch.
  • Preserve existing single-key shortcuts and immediate Ctrl+X copy when no sequence is available.
  • Dispose pending timers and registrations during reload or shutdown.

Why this belongs in Senpi

Senpi owns terminal input dispatch and existing keybindings. Implementing sequence matching in a consumer extension would either swallow input or duplicate host behavior. A host-level API keeps replay, conflict handling, diagnostics, and lifecycle ownership in one place.

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