Interactivity

Prompts read single keystrokes, so they require an interactive terminal. When standard input is not a TTY (for example a pipe or a CI job), prompts raise NotInteractiveError before rendering anything.

Keybindings

  • Arrow keys (or vi-like keybindings k, j, etc) to move the cursor.

  • Home/End jump to the first/last option.

  • Tab/Shift+Tab to switch tabs in Tabs and Form.

Interrupts

While a prompt is running:

  • Ctrl+C raises KeyboardInterrupt.

  • Ctrl+D (or Ctrl+Z on Windows) raises EOFError.

Handle both as you would for any other input() call.