GeezerVison is showing github.com — Standard keyboard cursor navigation (Home/End key, ctrl+left/right key) · Issue #2649 · anomalyco/opencode
Standard keyboard cursor navigation (Home/End key, ctrl+left/right key) #2649Labels opentuiThis relates to changes in v1.0, now that opencode uses opentui Description
- 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.
If there's an alternative keybinding to do what Home/End typically does, I couldn't find it in https://opencode.ai/docs/keybinds. Reacted by Fabian Kukuck, Stefan Schwarzer, Kevin Schaich, Žiga Trček, Dan Brown, Jaewoo Kim, Dmitry Prikotov, JDR, ArijanJ, Weyder Ferreira and 2 more Activitychanged 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, 2025JGKle commented 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 sai-sy commented on Sep 30, 2025 do you know if this has anything to do with #1975 and if that fixes your issue? JGKle commented on Oct 1, 2025 Reacted by Andrew Neilson, Dmitry Prikotov and berkerdo rekram1-node commented on 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! Reacted by JGK and cspipaon Reacted by JGK and Arsham Shirvani CSRessel commented on 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 commented on Nov 27, 2025 @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 rekram1-node commented on Dec 1, 2025 doodhout commented on Dec 11, 2025 FYI this is fixed in version 1.0.147 Reacted by Nindaleth Reacted by Adil Alizada Huge commented on 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. Reacted by tvandenbrugghen-stratalis, JDR, ArijanJ, Seblor, talistech and Kyle Baker ubunatic commented on 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. Reacted by Miklos, Kyle Baker, Xuntao Chi and Theodore Brown kylebakerio commented on 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. Reacted by Uwe Jugel, Theodore Brown, Jason Dunham, Tim Hutt, Xuntao Chi and flamewave000
MetadataMetadataopentuiThis relates to changes in v1.0, now that opencode uses opentui DevelopmentNo branches or pull requestsIssue actions
|