feat(tui): allow function keys through f24 in keymaps#25329
Merged
Conversation
etraut-openai
approved these changes
May 31, 2026
Collaborator
etraut-openai
left a comment
There was a problem hiding this comment.
Code looks good.
I tested locally and confirmed that it worked with terminals that support these extended function keys and that there aren't any issues with terminals that don't support them.
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
Closes #25006.
tui.keymapcurrently rejectsF13even though Codex's terminal event layer can report higher function keys. This prevents users from using common remappings such as Caps Lock toF13.What Changed
F24for stored TUI keybindings.f13throughf24in config normalization and runtime parsing./keymapcapture to persistF13throughF24.F13,F24, andF25.How to Test
Add a binding such as:
Start Codex and press the remapped
F13key.Confirm Codex loads the config without the previous
F1 through F12error and the action runs.Open
/keymap, captureF13for an action, and confirm the saved binding isf13.As a regression check, try to capture
F25and confirm Codex reports that onlyF1throughF24can be stored.Targeted tests:
just test -p codex-configjust test -p codex-tui function_keysFull
just test -p codex-tuicompleted with 2,752 passing tests, 4 skipped tests, and two unrelated guardian feature-flag failures:app::tests::update_feature_flags_disabling_guardian_clears_review_policy_and_restores_defaultapp::tests::update_feature_flags_disabling_guardian_clears_manual_review_policy_without_history