Make keybinding hints use configured keys

This commit is contained in:
Felipe Coury
2026-04-23 15:14:00 -03:00
parent 11f99b3c82
commit de0e2ccdea
22 changed files with 464 additions and 122 deletions
+6 -5
View File
@@ -36,13 +36,14 @@ Precedence is applied in this order (highest first):
### Presets
- `latest`: moving alias for the newest preset; today `latest -> v4`
- `v4`: current defaults, exposing reasoning shortcuts (`alt-,` / `alt-.`) in the keymap
- `latest`: moving alias for the newest preset; today `latest -> v5`
- `v5`: current defaults, exposing approval thread-open and strict auto-review shortcuts in the keymap
- `v4`: exposes reasoning shortcuts (`alt-,` / `alt-.`) in the keymap
- `v3`: exposes `copy = "ctrl-o"` in the keymap
- `v2`: restores `alt-d` as a `delete_forward_word` alias
- `v1`: frozen initial configurable keymap defaults
When defaults change in the future, a new version (for example `v4`) is added and
When defaults change in the future, a new version (for example `v6`) is added and
`latest` may move to it. Pin to `v1` if you want stable historical behavior.
TODO(docs): mirror this preset migration note on developers.openai.com.
@@ -72,8 +73,8 @@ TODO(docs): mirror this preset migration note on developers.openai.com.
`half_page_down`, `jump_top`, `jump_bottom`, `close`, `close_transcript`,
`edit_previous_message`, `edit_next_message`, `confirm_edit_message`
- `list`: `move_up`, `move_down`, `accept`, `cancel`
- `approval`: `open_fullscreen`, `approve`, `approve_for_session`,
`approve_for_prefix`, `decline`, `cancel`
- `approval`: `open_fullscreen`, `open_thread`, `approve`, `approve_for_session`,
`approve_for_prefix`, `approve_with_strict_auto_review`, `decline`, `cancel`
- `onboarding`: `move_up`, `move_down`, `select_first`, `select_second`,
`select_third`, `confirm`, `cancel`, `quit`, `toggle_animation`
+3 -1
View File
@@ -18,7 +18,7 @@
[tui.keymap]
# Preset alias for built-in defaults.
# "latest" currently points to "v4".
# "latest" currently points to "v5".
preset = "latest"
[tui.keymap.global]
@@ -149,9 +149,11 @@ cancel = ["esc"]
# Approval modal actions.
# Include ctrl+shift fallback for terminals that preserve SHIFT on Ctrl letter chords.
open_fullscreen = ["ctrl-a", "ctrl-shift-a"]
open_thread = ["o"]
approve = ["y"]
approve_for_session = ["a"]
approve_for_prefix = ["p"]
approve_with_strict_auto_review = ["r"]
decline = ["esc", "n"]
cancel = ["c"]
+4 -2
View File
@@ -7,14 +7,14 @@ For runtime behavior, safety invariants, and testing guidance, see
## Preset behavior
- `latest` is an alias to the newest shipped preset.
- Today, `latest -> v4`.
- Today, `latest -> v5`.
- To keep stable behavior over time, pin `preset = "v1"`.
## Precedence
1. `tui.keymap.<context>.<action>`
2. `tui.keymap.global.<action>` (chat/composer fallback actions only)
3. Preset default (`v4` today)
3. Preset default (`v5` today)
## Default `v1` Compatibility Notes
@@ -116,9 +116,11 @@ For runtime behavior, safety invariants, and testing guidance, see
### `approval`
- `open_fullscreen`: open full-screen approval details
- `open_thread`: open the originating thread from an approval prompt
- `approve`: approve primary request
- `approve_for_session`: approve-for-session option
- `approve_for_prefix`: approve-for-prefix option
- `approve_with_strict_auto_review`: grant permissions for this turn with strict auto review
- `decline`: decline request
- `cancel`: cancel elicitation request
- MCP elicitation safety rule: `Esc` is always treated as `cancel` (never
+3 -3
View File
@@ -85,8 +85,8 @@ at `https://github.com/openai/codex/blob/main/docs/default-keymap.toml`.
Preset semantics:
1. `latest` is an alias to the newest shipped preset.
2. `v4` is the current baseline; `v1`, `v2`, and `v3` are frozen for historical behavior.
3. Today, `latest -> v4`.
2. `v5` is the current baseline; `v1`, `v2`, `v3`, and `v4` are frozen for historical behavior.
3. Today, `latest -> v5`.
User guidance:
@@ -96,7 +96,7 @@ User guidance:
Developer policy:
1. Do not mutate old preset defaults after release.
2. Add a new version (for example `v4`) for behavior changes.
2. Add a new version (for example `v6`) for behavior changes.
3. Update docs and migration notes whenever `latest` changes.
Migration notes: