Vim-mode-aware keybinding contexts: ctrl+u scroll binding collides with insert-mode line editing in fullscreen

Resolved 💬 1 comment Opened Jun 3, 2026 by undont Closed Jul 7, 2026

What I'm trying to do

Use fullscreen rendering (/tui fullscreen) for the flicker-free output and flat memory, while keeping true vim-style scroll navigation of the conversation (ctrl+u/ctrl+d half-page, ctrl+e/ctrl+y line). Today the missing piece keeps me on the classic renderer + tmux copy-mode for scrolling, which is exactly what fullscreen is meant to replace.

The problem

In the Scroll context I can bind:

  • ctrl+dscroll:halfPageDown ✅ works
  • ctrl+escroll:lineDown, ctrl+yscroll:lineUp ✅ work
  • ctrl+uscroll:halfPageUp ⚠️ works for scrolling, but breaks Cmd+Backspace in the input.

Cmd+Backspace (delete-to-start-of-line) is emitted by the terminal as byte 0x15 — the same byte as ctrl+u. So a ctrl+u scroll binding intercepts it and the line-delete is gone. The two can't coexist.

Why vim doesn't have this problem

Neovim has the identical byte collision but resolves it modally: ctrl+u = half-page-up in NORMAL, and = delete-to-line-start (i_CTRL-U) in INSERT. One byte, mode-dependent meaning, never a conflict.

Root cause (as I understand it from the docs)

Per the keybindings docs "Vim mode interaction" section: "Most Ctrl+key shortcuts pass through vim mode to the keybinding system." So ctrl+u bypasses vim's modal logic entirely and goes to the component-level keybinding layer. And keybinding contexts are component-based (Chat, Scroll, …) — there is no Chat:Normal vs Chat:Insert. So even with vim mode enabled (which clearly has the INSERT/NORMAL/VISUAL distinction), there's no way to express "ctrl+u scrolls in NORMAL, deletes in INSERT."

Feature request

Make keybindings able to see the vim sub-mode. Any one of these would unblock it:

  1. Vim-mode-aware contexts — e.g. Chat:Normal, Chat:Insert, Chat:Visual, so bindings can be scoped to the editor sub-mode.
  2. Route ctrl+ keys through vim mode when vim mode is enabled, so INSERT-mode ctrl+u keeps its native i_CTRL-U line-delete.
  3. Add a chat:deleteToLineStart action (and friends) so ctrl+u can at least be given a meaningful INSERT-mode binding, instead of only chat:clearInput which wipes the whole input.

The modal information already exists in the editor — the keybinding layer just doesn't consult it. Closing that gap would make fullscreen genuinely usable for vim users.

Environment

  • Claude Code 2.1.161
  • macOS 26.5
  • tmux (next-3.7)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗