openai / openai/codex

Add Alt/Option+P shortcut to open the model picker

Open
#44,600 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

CLI enhancement TUI
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Feature request

Add Alt+P (Option+P on macOS) as a keyboard shortcut for opening the existing model picker in the TUI.

Motivation

Switching models is a frequent action, but currently requires opening the slash-command flow. A dedicated shortcut would make model switching faster while reusing the existing picker and behavior.

Expected behavior

  • Alt+P / Option+P opens the existing model picker.
  • Any unfinished composer draft is preserved, including during an active turn.
  • Existing popup focus and startup checks remain respected.
  • The shortcut cannot be shadowed by a conflicting custom key binding.

Tested implementation

A focused implementation is available in my public fork:

https://github.com/openai/codex/compare/main...cathrynlavery:codex:feat/alt-p-model-picker?expand=1

The implementation changes five TUI files and includes shortcut routing, draft-preservation coverage, popup/startup guard coverage, and keymap conflict validation.

Validation

  • 4,595 TUI tests passed; 6 skipped.
  • Formatting and whitespace checks passed.

If this behavior and approach align with the project, would a maintainer be willing to invite this contribution as a pull request?

Implemented with assistance from Knox, an AI assistant.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the TUI shortcut routing and keymap handling, then trace the existing model picker opened by the slash-command flow. Compare the public fork's five-file implementation and its shortcut, draft-preservation, popup/startup guard, and keymap conflict tests. Done means Alt+P or Option+P opens the picker while preserving drafts and respecting existing guards and bindings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.