fix(tui): support modified backspace/delete keys#21058
Merged
Merged
Conversation
Contributor
|
If a user already has a Possible config conflcits:
Config example: Resultant error: |
canvrno-oai
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Fixes #21046.
Codex TUI 0.128.0 can show Backspace/Delete-related editor shortcuts in
/keymap, but Windows-style modified Backspace/Delete events were still dropped by the composer because the default editor keymap did not include those modified special-key variants. On Windows/CMD this meantShift+BackspaceandShift+Deletedid not fall through to normal character deletion, andCtrl+Backspace/Ctrl+Deletedid not perform the word deletion users expect from Windows text inputs.What Changed
shift-backspaceandshift-deleteso shifted delete keys keep normal grapheme deletion behavior.ctrl-backspace,ctrl-shift-backspace,ctrl-delete, andctrl-shift-deleteso Windows-style word deletion works when terminals preserve those modifiers.How to Test
hello worldin the composer.Ctrl+Backspace; confirmworldis removed andhelloremains.worldagain, move the cursor before it, then pressCtrl+Delete; confirm the next word is removed.Shift+BackspaceandShift+Delete; confirm they delete one character in the expected direction instead of doing nothing./keymap, inspect the Editor deletion actions, and confirm the modified Backspace/Delete aliases are visible as configurable defaults.Targeted tests:
cargo test -p codex-tui keymap::testscargo test -p codex-tui bottom_pane::textarea::testscargo test -p codex-tui keymap_setup::tests