Home/End keys don’t work in TUI2 composer (intercepted by transcript scrolling)
Resolved 💬 1 comment Opened Dec 19, 2025 by kvcop Closed Dec 19, 2025
What version of Codex is running?
codex-cli 0.75.0
What subscription do you have?
Pro
Which model were you using?
_No response_
What platform is your computer?
Linux 6.14.0-37-generic x86_64 x86_64
What issue are you seeing?
- Pressing Home/End in TUI2 does not move the cursor in the composer.
- Instead, the keys are consumed by transcript scroll handling (jump to top/bottom).
What steps can reproduce the bug?
- Launch:
codex --enable tui2 - Write some text
- Press HOME/END buttons.
What is the expected behavior?
- When the transcript is at the bottom (i.e., not scrolled), Home/End should move the cursor within the composer.
- Transcript jump should only happen when transcript scrolling is active, or use a modified key chord.
Additional information
Summary
In TUI2, Home/End never reach the composer because they are intercepted at the App level for transcript scrolling. As a result, Home/End don’t move the cursor in the input
field.
Root Cause (from code review)
- codex-rs/tui2/src/bottom_pane/textarea.rs already handles Home/End correctly for cursor movement.
- codex-rs/tui2/src/app.rs unconditionally intercepts Home/End and uses them to jump the transcript (TranscriptScroll::Scrolled / ToBottom).
- These events never reach the composer.
Suggested Fix
Only intercept Home/End in App when the transcript is scrolled (i.e., TranscriptScroll != ToBottom or selection active). Otherwise pass them through to chat_widget so the
composer handles them.
Files to update
- codex-rs/tui2/src/app.rs (key handling logic)
- codex-rs/tui2/src/bottom_pane/footer.rs (key hints if shortcut changes)
- Create/update tests for composer key handling vs transcript jump
Notes
- Legacy TUI doesn’t intercept Home/End, so the issue is TUI2-specific.
- Footer already hints Home/End as "jump" only when transcript is scrolled, which aligns with the conditional-intercept approach.
Will be happy to provide PR for this!
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗