Skip to content

config: accept minus in TUI keymap config#22192

Merged
fcoury-oai merged 1 commit into
mainfrom
fcoury/fix-keymap-minus
May 11, 2026
Merged

config: accept minus in TUI keymap config#22192
fcoury-oai merged 1 commit into
mainfrom
fcoury/fix-keymap-minus

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai commented May 11, 2026

Summary

Fixes #22128.

The /keymap flow already persists the - key as minus, and the runtime keymap parser already accepts that spelling. codex-config was the missing leg: it rejected minus during config deserialization, so a binding saved by Codex could fail on the next startup or config reload.

What Changed

  • Accept minus as a valid canonical key name in tui.keymap config normalization.
  • Update the config validation message so its supported-key list includes minus.
  • Add regression coverage that deserializes both minus and alt-minus under [tui.keymap.global] and verifies the normalized config shape.

How to Test

  1. Start Codex TUI.
  2. Run /keymap.
  3. Assign the - key to an action and save the change.
  4. Restart Codex or reload the config.
  5. Confirm the config loads normally and the saved binding remains usable instead of failing on minus.
  6. As a focused regression check, repeat with a modifier form such as alt-- captured through /keymap, which persists as alt-minus and should also reload successfully.

Targeted tests:

  • cargo test -p codex-config

@fcoury-oai fcoury-oai changed the title config: accept minus in tui keymaps config: accept in TUI keymap config May 11, 2026
@fcoury-oai fcoury-oai changed the title config: accept in TUI keymap config config: accept minus in TUI keymap config May 11, 2026
@fcoury-oai fcoury-oai merged commit 99b98ae into main May 11, 2026
26 checks passed
@fcoury-oai fcoury-oai deleted the fcoury/fix-keymap-minus branch May 11, 2026 19:34
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/keymap can save minus, but config loading rejects it on next startup

2 participants