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
Standard keyboard cursor navigation (Home/End key, ctrl+left/right key) #2649
Type a very long prompt, such that it wraps to multiple lines
Try using the Start/End keys.
It moves the cursor to the very start/end of the entire prompt, rather than the start/end of the current line (which is standard/expected behavior - i.e. you can try it in ClaudeCode, or here in Github's textboxes).
This makes it very cumbersome to navigate around long prompts - i.e. it seems like the only way to get from one far edge of the input box to the other is to just hold the arrow key and wait for the key repeat.
changed the title [-]Home/End key goes to start/end of the entire paragraph, rather than start/end of the current line[/-][+]Standard keyboard cursor navigation (Home/End key, ctrl+left/right key)[/+]on Sep 17, 2025
Addendum: Ctrl+left arrow & ctrl+right arrow is also not exhibiting standard cursor navigation. It's supposed to jump the cursor to the start/end of the current word, but in opencode it has no effects (again can try it in ClaudeCode or Github's textboxes to see expected behavior.)
Addendum 2: it looks like it's using Alt+left & Alt+right to do what Ctrl+left & Ctrl+right is supposed to do. That's pretty confusing/nonstandard tho as that key combination typically means "navigate back" and "navigate forward" (i.e. in browsers, IDEs, etc).
Reacted by Fabian Kukuck, Jaewoo Kim, Dmitry Prikotov, Stefan Schwarzer, João Paulo Fontenele, Richard Phuker and Kyle Baker
@rekram1-node this was fixed until v1.0.0 release. After that, with the same configuration (i.e. ctrl+rightarrow and ctrl+leftarrow being freed from any keybinds) ctrl+arrow keys isn't valid anymore, despite not being mapped to any feature in the Opencode configuration
With no keybinds configured the Home and End keys as well as PgUp/Down are moving in the chat history, not in the prompt, both in Alacritty and WSL shell. This is meant to be the default and changeble with the session_child_cycle": "none",?
If so, I'd like to propose Ctrl+these navigate the cursor in prompt area by default, currently they do nothing by default, I believe.
Reacted by tvandenbrugghen-stratalis, JDR, ArijanJ, Seblor, talistech and Kyle Baker
Ctrl+Left/Right works well now in v1.17.11. Home/End keys are still misbound to chat scrolling instead of proper text input handling when the chat input is focused.
Home/End text navigation is ubiquitous. Please make it a default.
Reacted by Miklos, Kyle Baker, Xuntao Chi and Theodore Brown
came here to search this issue, this is maddening and a glaring fault. it makes it feel like opencode wasn't made by/for coders, home/end is a major part of how I interact with any computer and I feel like that's true for every serious dev. baffling that this behavior wouldn't irritate anyone working on this project.
Reacted by Uwe Jugel, Theodore Brown, Jason Dunham, Tim Hutt and Xuntao Chi
Activity
[-]Home/End key goes to start/end of the entire paragraph, rather than start/end of the current line[/-][+]Standard keyboard cursor navigation (Home/End key, ctrl+left/right key)[/+]JGKle commentedon Sep 17, 2025
Addendum: Ctrl+left arrow & ctrl+right arrow is also not exhibiting standard cursor navigation. It's supposed to jump the cursor to the start/end of the current word, but in opencode it has no effects (again can try it in ClaudeCode or Github's textboxes to see expected behavior.)
Addendum 2: it looks like it's using Alt+left & Alt+right to do what Ctrl+left & Ctrl+right is supposed to do. That's pretty confusing/nonstandard tho as that key combination typically means "navigate back" and "navigate forward" (i.e. in browsers, IDEs, etc).
sai-sy commentedon Sep 30, 2025
do you know if this has anything to do with #1975 and if that fixes your issue?
JGKle commentedon Oct 1, 2025
I'm back to ClaudeCode unfortunately, due to a number of critical issues in opencode (i.e. text copying is broken, can't give it screenshots, can't interrupt reliably). Will come back & try this again if/when those are addressed.
rekram1-node commentedon Oct 1, 2025
@JGKle lots of tui improvements coming soon, I think in a week or two all of these should be addressed, thanks for your feedback!
totally understandable, we are working on this!
CSRessel commentedon Oct 15, 2025
For those where this keybinding is a deal breaker, it can be solved with this comment's config:
#1975 (comment)
{ "$schema": "https://opencode.ai/config.json", "keybinds": { "session_child_cycle": "none", "session_child_cycle_reverse": "none", }, ... }AdiKsOnDev commentedon Nov 27, 2025
@rekram1-node this was fixed until
v1.0.0release. After that, with the same configuration (i.e.ctrl+rightarrowandctrl+leftarrowbeing freed from any keybinds) ctrl+arrow keys isn't valid anymore, despite not being mapped to any feature in the Opencode configurationrekram1-node commentedon Dec 1, 2025
noted
doodhout commentedon Dec 11, 2025
FYI this is fixed in version 1.0.147
Huge commentedon Jan 2, 2026
With no keybinds configured the Home and End keys as well as PgUp/Down are moving in the chat history, not in the prompt, both in Alacritty and WSL shell. This is meant to be the default and changeble with the
session_child_cycle": "none",?If so, I'd like to propose Ctrl+these navigate the cursor in prompt area by default, currently they do nothing by default, I believe.
ubunatic commentedon Jun 26, 2026
Ctrl+Left/Right works well now in v1.17.11. Home/End keys are still misbound to chat scrolling instead of proper text input handling when the chat input is focused.
Home/End text navigation is ubiquitous. Please make it a default.
kylebakerio commentedon Aug 21, 2026
came here to search this issue, this is maddening and a glaring fault. it makes it feel like opencode wasn't made by/for coders, home/end is a major part of how I interact with any computer and I feel like that's true for every serious dev. baffling that this behavior wouldn't irritate anyone working on this project.