Skip to content

Add a keyboard modal for selecting and actioning structured reply units #14386

Closed as not planned

Description

@oxysoft

Summary

Codex should support a keyboard-first modal selection mode for assistant replies, so users can navigate structured reply units and act on them without touching the mouse.

This is the keyboard companion to #14384.

The idea is to make reply structure directly operable:

  • paragraphs remain whole
  • list items remain whole
  • tool calls / tool results can be selected as units
  • code blocks can be selected as units

Problem

Right now, once a reply has been generated, the main path for reusing part of it is still too composer-bound:

  • manual text selection
  • mouse interaction
  • retyping
  • awkward clipboard workflows

That wastes a lot of structure that Codex already produced.

The terminal should let users break attention out of the composer and operate directly on reply objects with the keyboard.

Requested behavior

Add a modal reply-selection mode with keyboard navigation, for example:

  • Alt+Up / Alt+Down to move selection across structured reply units
  • selected units are visibly highlighted
  • paragraphs remain whole instead of degenerating into line fragments
  • reply units can include:
    • paragraphs
    • bullet items
    • numbered items
    • code blocks
    • tool calls
    • tool results

Suggested actions

Inside this modal:

  • a = append selected unit(s) into the composer as quoted text (> ...) and remain in selection mode
  • Enter = same as a, but return focus to the composer immediately
  • Space = toggle selection for multi-select
  • Shift+Up / Shift+Down = stretch selection range

Configurable action system

This gets much more powerful if actions are configurable instead of hardcoded.

For example, users should be able to bind keys to actions like:

  • append_quote
  • append_plain
  • send_quote
  • send_with_prefix
  • pipe_to_command

Example configured actions:

  • quote and append, then let me continue typing
  • append with a prefix like fix this
  • send immediately in chat
  • pipe the selected text into a shell script

Example mental model:

  • select one or more reply units
  • hit a key
  • Codex performs the configured action on that structured selection

Why this matters

This becomes an excellent Swiss-army-knife interaction surface.

It dramatically improves developer flow because users are less trapped inside the composer and can move their attention across multiple zones:

  • the live thread
  • structured prior reply content
  • the composer
  • external command/script actions

That makes Codex feel more like an operable control surface and less like a single text box.

Design notes

  • this should be visually obvious when the mode is active
  • selection boundaries should follow semantic reply structure, not wrapped terminal lines
  • multi-selection should feel first-class, not bolted on
  • actions should be configurable in both keys and behavior
  • mouse and keyboard flows should feel like siblings, not separate products

Related issue

Invitation

I’d especially encourage discussion on:

  • better default keybindings
  • additional action types
  • good semantics for tool call / tool result selection
  • multi-selection UX
  • whether shell-command piping should be first-class or plugin-driven

Activity

  1. oxysoft commented on Mar 11, 2026

    @oxysoft
    Author

    Keyboard-first companion to #14384.

    The mouse ticket is about clicking structured reply units to copy/quote them. This one is the same reply-object model, but operated through a modal keyboard flow with semantic unit navigation, multi-select, and configurable actions.

    The two together feel like the right surface: mouse when you want immediacy, keyboard when you want speed, composition, and no attention break.

  2. added
    enhancement
    CLI
    TUI
    on Mar 11, 2026
  3. github-actions commented on Mar 11, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. oxysoft commented on Mar 11, 2026

    @oxysoft
    Author

    Related keyboard/control-surface issues:

    This issue feels strongest when seen as part of that larger TUI direction. A modal reply-selection system is much more compelling if Codex also has configurable bindings and a clearer terminal-native interaction philosophy overall.

  5. removed
    CLI
    on Mar 11, 2026
  6. etraut-openai commented on Apr 18, 2026

    @etraut-openai
    Contributor

    This feature request hasn't received any upvotes in over a month, so I'm going to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions