← Catalog

@zigai/pi-keymap-tweaks

Pi package for opinionated editor and message-submit key tweaks.

Extension

Install

Install with PiG

pig install npm:@zigai/pi-keymap-tweaks

Install with Pi

pi install npm:@zigai/pi-keymap-tweaks
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.

{
  "extensions": [
    "./src/index.ts"
  ]
}

README

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

Pi Keymap Tweaks

npm version npm downloads license

Opinionated editor and message-submit key tweaks for Pi.

Features

  • Makes Enter queue a follow-up and Alt+Enter steer the current run.
  • Normalizes terminal LF Enter input to submit correctly in SSH/TMUX sessions.
  • Prevents Up from recalling prompt history while a non-empty draft is open.
  • Uses Pi's configured app.models.clearAll key (recommended as Ctrl+X) to copy and delete the current editor line.
  • Adds Codex-style line start/end behavior for Pi's configured tui.editor.cursorLineStart and tui.editor.cursorLineEnd actions:
    • line start moves to the previous line when already at column 0
    • line end moves to the next line when already at the current line end
  • Supports cycling thinking levels backward, unbound by default and configurable via extension settings or Pi keybindings.

This extension provides behavior; key assignments still live in your Pi keybindings config.

{
  "tui.editor.cursorWordLeft": ["ctrl+a", "ctrl+left", "alt+left", "alt+b"],
  "tui.editor.cursorWordRight": ["ctrl+d", "ctrl+right", "alt+right", "alt+f"],
  "tui.editor.cursorLineStart": ["home", "ctrl+q"],
  "tui.editor.cursorLineEnd": ["end", "ctrl+e"],
  "tui.editor.jumpBackward": ["ctrl+home"],
  "tui.editor.jumpForward": ["ctrl+end"],
  "tui.editor.undo": ["ctrl+z"],
  "tui.editor.deleteCharForward": ["delete"],
  "app.models.clearAll": ["ctrl+x"],
  "app.thinking.cycleBackward": []
}

Install

pi install npm:@zigai/pi-keymap-tweaks

Configuration

Global settings are stored in ~/.pi/agent/extension-settings/pi-keymap-tweaks.json.

OptionTypeDefaultDescription
cycleThinkingBackwardKeystring | nullnullKeybinding to cycle thinking level backward (e.g. 'alt+shift+tab'). Unbound by default.
{
  "$schema": "./schemas/pi-keymap-tweaks.schema.json",
  "cycleThinkingBackwardKey": null
}

License

MIT