Ctrl+N and Ctrl+P should move the cursor up and down one line #2741

Closed
opened 2026-02-16 17:37:04 -05:00 by yindo · 4 comments
Owner

Originally created by @net on GitHub (Nov 9, 2025).

Originally assigned to: @thdxr on GitHub.

Ctrl+N and Ctrl+P are vital for navigating a buffer without having to use arrow keys, and should not be used for anything other than up and down. I suggest Ctrl+O as an available binding for the command pallet.

Originally created by @net on GitHub (Nov 9, 2025). Originally assigned to: @thdxr on GitHub. Ctrl+N and Ctrl+P are vital for navigating a buffer without having to use arrow keys, and should not be used for anything other than up and down. I suggest Ctrl+O as an available binding for the command pallet.
yindo added the opentui label 2026-02-16 17:37:04 -05:00
yindo closed this issue 2026-02-16 17:37:04 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 9, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2176: Missing readline Ctrl+N and Ctrl+P - This issue specifically requests using Ctrl+N and Ctrl+P for readline up/down movements instead of next/previous message functionality
  • #3640: 1.0.2 - Surprising unexpected ctrl+p/ctrl+n behaviour - Reports that Ctrl+P now opens a menu instead of previous behavior (scrolling through prior input)
  • #3850: Keybind: history_next broken with ctrl+n - Reports issues with Ctrl+N keybinding not working as expected for history navigation
  • #3913: File search ctrl + p ctrl + n don't cycle through search results - Reports Ctrl+N/P not working in file search results
  • #3626: 1.0.0 - Emacs style navigation keybindings not working - Reports emacs-style navigation (Ctrl+N/P) no longer working after TUI rewrite

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 9, 2025): This issue might be a duplicate of existing issues. Please check: - #2176: Missing readline Ctrl+N and Ctrl+P - This issue specifically requests using Ctrl+N and Ctrl+P for readline up/down movements instead of next/previous message functionality - #3640: 1.0.2 - Surprising unexpected ctrl+p/ctrl+n behaviour - Reports that Ctrl+P now opens a menu instead of previous behavior (scrolling through prior input) - #3850: Keybind: history_next broken with ctrl+n - Reports issues with Ctrl+N keybinding not working as expected for history navigation - #3913: File search ctrl + p ctrl + n don't cycle through search results - Reports Ctrl+N/P not working in file search results - #3626: 1.0.0 - Emacs style navigation keybindings not working - Reports emacs-style navigation (Ctrl+N/P) no longer working after TUI rewrite Feel free to ignore if none of these address your specific case.
Author
Owner

@thdxr commented on GitHub (Nov 11, 2025):

there's a lot of disagreement about what people want ctrl+n and ctrl+p to do
we will add a dedicated vim mode to the buffer at some point but closing for now as we're unlikely to change the defaults here

@thdxr commented on GitHub (Nov 11, 2025): there's a lot of disagreement about what people want ctrl+n and ctrl+p to do<br>we will add a dedicated vim mode to the buffer at some point but closing for now as we're unlikely to change the defaults here
Author
Owner

@net commented on GitHub (Nov 11, 2025):

At least please make it fixable via configuration. I don't see cursor up or cursor down keybinding here: https://opencode.ai/docs/keybinds/.

Also, consider that while not everyone knows and uses every readline keybinding, most know some, and you can't predict which ones someone will know, so by disrespecting any except the most esoteric ones you're guaranteed to be making the input worse for some users.

Even macOS text inputs use ctrl+n and ctrl+p to move up and down. Go into any standard macOS text input and try typing ctrl+n/ctrl+p.

@net commented on GitHub (Nov 11, 2025): At least please make it fixable via configuration. I don't see cursor up or cursor down keybinding here: https://opencode.ai/docs/keybinds/. Also, consider that while not everyone knows and uses every readline keybinding, most know some, and you can't predict which ones someone will know, so by disrespecting any except the most esoteric ones you're guaranteed to be making the input worse for some users. Even macOS text inputs use ctrl+n and ctrl+p to move up and down. Go into any standard macOS text input and try typing ctrl+n/ctrl+p.
Author
Owner

@net commented on GitHub (Dec 29, 2025):

It's possible to configure this now.

{
  "$schema": "https://opencode.ai/config.json",
  "keybinds": {
    "command_list": "ctrl+o",
    "input_move_up": "up,ctrl+p",
    "input_move_down": "down,ctrl+n"
  }
}
@net commented on GitHub (Dec 29, 2025): It's possible to configure this now. ```json { "$schema": "https://opencode.ai/config.json", "keybinds": { "command_list": "ctrl+o", "input_move_up": "up,ctrl+p", "input_move_down": "down,ctrl+n" } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2741