Skip to content

Standard keyboard cursor navigation (Home/End key, ctrl+left/right key) #2649

Closed

Description

@JGKle
  1. Type a very long prompt, such that it wraps to multiple lines
  2. Try using the Start/End keys.
  3. 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.

Activity

  1. 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
  2. JGKle commented on Sep 17, 2025

    @JGKle
    Author

    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).

  3. sai-sy commented on Sep 30, 2025

    @sai-sy
    Contributor

    do you know if this has anything to do with #1975 and if that fixes your issue?

  4. JGKle commented on Oct 1, 2025

    @JGKle
    Author

    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.

  5. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Contributor

    @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!

  6. CSRessel commented on Oct 15, 2025

    @CSRessel

    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",
      },
    
      ...
    }
  7. AdiKsOnDev commented on Nov 27, 2025

    @AdiKsOnDev

    @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

  8. rekram1-node commented on Dec 1, 2025

    @rekram1-node
    Contributor

    noted

  9. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 1, 2025
  10. doodhout commented on Dec 11, 2025

    @doodhout

    FYI this is fixed in version 1.0.147

  11. Huge commented on Jan 2, 2026

    @Huge

    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.

  12. ubunatic commented on Jun 26, 2026

    @ubunatic

    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.

  13. kylebakerio commented on Aug 21, 2026

    @kylebakerio

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions