You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tui: keypad Home and End do nothing in the session prompt #57113
The keypad (NumLock) variants of Home and End do nothing in the session prompt. Plain Home and End move the caret, but NumPad Home and NumPad End are silently dropped, so a user on a full-size keyboard who navigates with the keypad cannot jump to the start or end of the prompt.
This is a small remaining gap in the same area as #56890 (report: plain Home/End jumped the transcript instead of moving the caret). The default transcript jumps no longer claim Home and End, and the keypad mirrors of the bare navigation keys are covered by #55870, but the two buffer commands in the prompt are not part of that change: input.buffer.home and input.buffer.end still default to none, so no binding claims the keypad names.
Plugins
None.
OpenCode version
V2, current dev (815de9950b), @opentui/core 0.6.6.
Steps to reproduce
Open a session in a terminal that reports keypad keys with the kitty keyboard protocol (for example Windows Terminal, which sends CSI 57423 u for NumPad Home and CSI 57424 u for NumPad End).
Type two lines into the prompt, for example aa, Shift+Enter, bb, leaving the caret at the end.
Press NumPad Home, then type x.
Press NumPad End, then type y.
Observed: the prompt reads aa\nbbxy — both keypad keys were ignored and the characters went in at the caret.
Expected: the prompt reads xaa\nbby — NumPad Home and NumPad End land where plain Home and End land, which is the start and the end of the prompt.
The same measurement can be taken without a physical keypad by feeding the two CSI-u sequences to the renderer, which is how the reproduction in the pull request is automated.
Screenshot and/or share link
Not applicable; deterministic renderer reproduction.
Cause: input.buffer.home / input.buffer.end defaulted to none, so no binding claimed the keypad names in the session prompt. Measured plain Home first, with the transcript jumps unbound — on a two-line prompt with the caret at the end, Home then x gives xaa\nbb, i.e. plain Home is a start-of-buffer move — so the keypad keys are bound to the buffer commands rather than the line commands (ctrl+a / ctrl+e), which would have meant something different.
The regression test feeds the same CSI 57423 u / CSI 57424 u sequences this report describes and asserts xaa\nbby, so the fix is checked against the exact reproduction.
Thanks for the detailed report and the deterministic reproduction!
I think this is a duplicate of #55533. That issue reports the same root cause: under the kitty keyboard protocol, NumPad Home/End arrive as kphome/kpend (CSI 57423 u / CSI 57424 u), no default keybind names them, and they get dropped. It also expects every NumPad navigation key to act like its regular counterpart, which includes the session prompt. You're right that PR #55870 doesn't cover input.buffer.home/input.buffer.end. That's a gap in the fix for #55533, though, not a separate problem, so your PR #57114 can address it under #55533.
Possible duplicates and related issues, ordered from most to least likely:
Closing this as a duplicate of #55533, since there hasn't been a reply in the past day explaining how it differs. Both are about NumPad Home/End (kphome/kpend) being dropped because no default keybind names them. Please follow #55533 for updates. Your PR #57114 can address the prompt's input.buffer.home/input.buffer.end gap there.
Until a fix lands, binding "input.buffer.home": "kphome" and "input.buffer.end": "kpend" in your TUI config should work around it. If this turns out to be a different problem, reply here and it can be reopened. Thanks again for the clear reproduction!
Activity
argszero commentedon Oct 19, 2026
Fix opened in #57114.
Cause:
input.buffer.home/input.buffer.enddefaulted tonone, so no binding claimed the keypad names in the session prompt. Measured plain Home first, with the transcript jumps unbound — on a two-line prompt with the caret at the end, Home thenxgivesxaa\nbb, i.e. plain Home is a start-of-buffer move — so the keypad keys are bound to the buffer commands rather than the line commands (ctrl+a/ctrl+e), which would have meant something different.The regression test feeds the same
CSI 57423 u/CSI 57424 usequences this report describes and assertsxaa\nbby, so the fix is checked against the exact reproduction.opencode-agent commentedon Oct 19, 2026
Thanks for the detailed report and the deterministic reproduction!
I think this is a duplicate of #55533. That issue reports the same root cause: under the kitty keyboard protocol, NumPad Home/End arrive as
kphome/kpend(CSI 57423 u/CSI 57424 u), no default keybind names them, and they get dropped. It also expects every NumPad navigation key to act like its regular counterpart, which includes the session prompt. You're right that PR #55870 doesn't coverinput.buffer.home/input.buffer.end. That's a gap in the fix for #55533, though, not a separate problem, so your PR #57114 can address it under #55533.Possible duplicates and related issues, ordered from most to least likely:
kp*names; same cause and symptom, and its expected behaviour covers the promptUntil a fix lands, you can bind the keypad keys yourself in your TUI config:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 20, 2026
Closing this as a duplicate of #55533, since there hasn't been a reply in the past day explaining how it differs. Both are about NumPad Home/End (
kphome/kpend) being dropped because no default keybind names them. Please follow #55533 for updates. Your PR #57114 can address the prompt'sinput.buffer.home/input.buffer.endgap there.Until a fix lands, binding
"input.buffer.home": "kphome"and"input.buffer.end": "kpend"in your TUI config should work around it. If this turns out to be a different problem, reply here and it can be reopened. Thanks again for the clear reproduction!