mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
Publish keymap system documentation first so the implementation stack can be reviewed against explicit behavior and invariants. This commit adds the keymap system guide, action matrix, default keymap template, and config/example documentation updates, plus a rollout plan used to stage the additive refactor and validation work.
3.6 KiB
3.6 KiB
TUI Keymap Action Matrix
This file defines the supported keymap actions and their default v1 bindings.
For runtime behavior, safety invariants, and testing guidance, see
docs/tui-keymap.md.
Preset behavior
latestis an alias to the newest shipped preset.- Today,
latest -> v1. - To keep stable behavior over time, pin
preset = "v1".
Precedence
tui.keymap.<context>.<action>tui.keymap.global.<action>(chat/composer fallback actions only)- Preset default (
v1today)
Default v1 Compatibility Notes
- Some actions intentionally ship with multiple bindings for the same logical shortcut because terminals differ in modifier reporting.
- Today this includes:
composer.toggle_shortcuts:?andshift-?approval.open_fullscreen:ctrl-aandctrl-shift-aonboarding.toggle_animation:ctrl-.andctrl-shift-.
- Keep these paired defaults unless/until key-event normalization is made platform-consistent at a lower layer.
Action Definitions
global
open_transcript: open transcript overlayopen_external_editor: open external editor for current draftedit_previous_message: begin/advance edit-previous flow when composer is emptyconfirm_edit_previous_message: confirm selected previous message for editingsubmit: submit current draftqueue: queue current draft while a task is runningtoggle_shortcuts: toggle composer shortcut overlay
chat
edit_previous_message: chat override for edit-previous flowconfirm_edit_previous_message: chat override for edit confirmation
composer
submit: composer override for submitqueue: composer override for queuetoggle_shortcuts: composer override for shortcut overlay toggle
editor
insert_newline: insert newline in text editormove_left/move_right/move_up/move_down: cursor movementmove_word_left/move_word_right: word movementmove_line_start/move_line_end: line boundary movementdelete_backward/delete_forward: single-char deletiondelete_backward_word/delete_forward_word: word deletionkill_line_start/kill_line_end: kill to line boundaryyank: paste kill-buffer contents
pager
scroll_up/scroll_down: row scrollpage_up/page_down: page scrollhalf_page_up/half_page_down: half-page scrolljump_top/jump_bottom: jump to top/bottomclose: close pager overlayclose_transcript: close transcript via transcript toggle bindingedit_previous_message/edit_next_message: backtrack navigation in transcriptconfirm_edit_message: confirm selected backtrack message
list
move_up/move_down: list navigationaccept: select current itemcancel: close list view
approval
open_fullscreen: open full-screen approval detailsapprove: approve primary requestapprove_for_session: approve-for-session optionapprove_for_prefix: approve-for-prefix optiondecline: decline requestcancel: cancel elicitation request- MCP elicitation safety rule:
Escis always treated ascancel(neverdecline) so dismissal cannot accidentally continue execution.
onboarding
move_up/move_down: onboarding list navigationselect_first/select_second/select_third: numeric selection shortcutsconfirm: confirm highlighted onboarding selectioncancel: cancel current onboarding sub-flowquit: quit onboarding flowtoggle_animation: switch welcome animation variant- API-key entry guard: printable
quitbindings are treated as text input once the API-key field has text; control/alt quit chords are not suppressed.