Skip to content

fix(tui): support Option-key shortcuts across terminal encodings#12248

Closed
charley-oai wants to merge 3 commits intomainfrom
fix/tui-option-up-queue-restore
Closed

fix(tui): support Option-key shortcuts across terminal encodings#12248
charley-oai wants to merge 3 commits intomainfrom
fix/tui-option-up-queue-restore

Conversation

@charley-oai
Copy link
Copy Markdown
Contributor

@charley-oai charley-oai commented Feb 19, 2026

Summary

  • fix terminal-encoding compatibility for Option-key shortcuts used in chat input
  • ensure queued-message edit works when Option+Up is delivered as Ctrl+Up (e.g. CSI 1;5A)
  • ensure word-delete shortcuts work when terminals deliver Option as Control:
    • Option+Backspace -> accept Ctrl+Backspace
    • Option+Delete -> accept Ctrl+Delete
  • add regression coverage for the control-encoded variants

Why

Some terminals/settings (including macOS Terminal in certain setups) encode Option-modified keys as control-modified sequences, so strict Alt-only matching misses the intended shortcut.

Shortcut compatibility

  • no dedicated Ctrl+Up, Ctrl+Backspace, or Ctrl+Delete binding is overridden by these aliases
  • intentionally did not remap Option+b / Option+f to control aliases because Ctrl+b / Ctrl+f already mean single-character cursor movement

Codex author

codex resume 019c73a1-aac6-7a11-9500-95388ad319ff

@charley-oai
Copy link
Copy Markdown
Contributor Author

@codex review this

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai changed the title fix(tui): restore Option+Up queue edit shortcut fix(tui): make Option+Up queued-message edit work in VS Code terminal Feb 19, 2026
@charley-oai charley-oai changed the title fix(tui): make Option+Up queued-message edit work in VS Code terminal fix(tui): make Option+Up queued-message edit robust across terminals Feb 19, 2026
@charley-oai charley-oai force-pushed the fix/tui-option-up-queue-restore branch from ea116be to 0ecc0ec Compare February 19, 2026 21:33
@charley-oai charley-oai changed the title fix(tui): make Option+Up queued-message edit robust across terminals fix(tui): accept ctrl-up for queued message edit Feb 19, 2026
@charley-oai
Copy link
Copy Markdown
Contributor Author

@codex review this

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai changed the title fix(tui): accept ctrl-up for queued message edit fix(tui): handle Option-key shortcuts encoded as Control Feb 19, 2026
@charley-oai charley-oai changed the title fix(tui): handle Option-key shortcuts encoded as Control fix(tui): support Option-key shortcuts across terminal encodings Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants