← Catalog

@pi-unipi/input-shortcuts

Keyboard shortcuts for stash/restore, undo/redo, clipboard, and thinking toggle — chord-based overlay system

Extension

Install

Install with PiG

pig install npm:@pi-unipi/input-shortcuts

Install with Pi

pi install npm:@pi-unipi/input-shortcuts
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [],
  "themes": [],
  "prompts": [],
  "extensions": [
    "./src/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 3.0.3 (README.md). PiG does not review it.

Input Shortcuts

Input Shortcuts adds editor keys to stash text, undo edits, copy the last reply and capture a kanboard task.

@pi-unipi/input-shortcuts · part of UniPi

What it does

  • Alt+S opens a chord overlay. You press one more key to run an action.
  • Stash keeps one piece of editor text, and the stash stays after a restart.
  • Undo and redo step through editor text. History starts at the first keystroke.
  • Y copies the last agent reply to the system clipboard.
  • K adds the editor text to the kanboard backlog.
  • After Ctrl+C clears the editor, the cleared text stays in the transcript, struck through. ↑ restores it.

Quick start

Input Shortcuts ships in @pi-unipi/unipi. To install it alone:

pi install npm:@pi-unipi/input-shortcuts
  1. Type some text in the editor.
  2. Press Alt+S.
  3. Press S to stash the text. The editor clears.
  4. Press Alt+S, then S again to restore the text.

Shortcuts

KeysWhat it does
Alt+S, then SStash or restore. With text in the editor, it saves the text and clears the editor. With an empty editor, it restores the stash.
Alt+S, then AAdds the stash text to the end of the editor text. The stash stays.
Alt+S, then UUndo.
Alt+S, then RRedo. An edit after an undo clears the redo steps.
Alt+S, then YCopies the last agent reply to the clipboard.
Alt+S, then KAdds the editor text to the kanboard backlog as a task. File paths in the text become attachments.
Alt+IAdds a tab character to the end of the editor text.
Esc in the overlayCloses the overlay. Any other key also closes it.

Each action shows a short message in the status bar for 2 seconds. An error message stays for 3 seconds.

The K action needs Kanboard in the same session. If Kanboard is not loaded, the status bar shows kanboard not loaded.

Settings

Open /unipi:settings → Input Shortcuts. The namespace is input-shortcuts. The project scope is the default.

KeyDefaultWhat it does
chordKeyalt+sStored chord key. The info screen shows it.
tabInsertKeyalt+iStored tab key. The info screen shows it.

In this release, the shortcuts stay on Alt+S and Alt+I. The code does not read these two settings when it registers the keys.

How it works

  • Stash. The stash file is .unipi/config/input-shortcuts.json in the current folder. Input Shortcuts writes it to a temp file first, then renames it.
  • Undo history. Input Shortcuts records the editor text two times for each typing burst: before the first key and after the last key. A burst ends after 600 ms with no keys, or after 2 seconds. The history keeps 100 states or 2,000,000 characters at most. The history does not stay after the session ends.
  • Copy. Y uses the same clipboard function as pi /copy.
  • Ctrl+C. Input Shortcuts does not change what Ctrl+C does. It only reads the key. The struck-through line is a UI entry, so the model never sees it.

See also