1.0.2 - Surprising unexpected ctrl+p/ctrl+n behaviour. #2406

Closed
opened 2026-02-16 17:35:29 -05:00 by yindo · 6 comments
Owner

Originally created by @ariane-emory on GitHub (Oct 31, 2025).

Originally assigned to: @thdxr on GitHub.

Description

C-p and C-n used to scroll to/from prior input, the same as they do in many (maybe most?) other applications.

Now C-p seems to make some sort of menu pop up. This is surprising unexpected behaviour. C-n does not seem like it does anything now.

Please allow some way to restore the prior behaviour of these keys for those of us who prefer constant key bindings across the applications we use, having to retrain muscle memory to deal with one particular application's inconsistent, non-standard keybinding choices adds quite a cognitive load when trying to use the application.

OpenCode version

1.0.2

Steps to reproduce

  1. Hit C-p and be startled and confused when a menu appears.
  2. Hit C-n and be startled and confused when nothing happens.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @ariane-emory on GitHub (Oct 31, 2025). Originally assigned to: @thdxr on GitHub. ### Description `C-p` and `C-n` used to scroll to/from prior input, the same as they do in many (maybe most?) other applications. Now `C-p` seems to make some sort of menu pop up. This is surprising unexpected behaviour. `C-n` does not seem like it does anything now. Please allow some way to restore the prior behaviour of these keys for those of us who prefer constant key bindings across the applications we use, having to retrain muscle memory to deal with one particular application's inconsistent, non-standard keybinding choices adds quite a cognitive load when trying to use the application. ### OpenCode version 1.0.2 ### Steps to reproduce 1. Hit `C-p` and be startled and confused when a menu appears. 2. Hit `C-n` and be startled and confused when nothing happens. ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the opentuibug labels 2026-02-16 17:35:29 -05:00
yindo closed this issue 2026-02-16 17:35:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2025):

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

  • #3379: Reports readline-style keybindings (ctrl + n, ctrl + p) not working for list navigation
  • #2176: Reports missing readline Ctrl+N and Ctrl+P for up/down movements, requesting configurable keybinds
  • #3626: Reports Emacs style navigation keybindings (Ctrl+n and Ctrl+p) not working in menus after TUI rewrite

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

@github-actions[bot] commented on GitHub (Oct 31, 2025): This issue might be a duplicate of existing issues. Please check: - #3379: Reports readline-style keybindings (ctrl + n, ctrl + p) not working for list navigation - #2176: Reports missing readline Ctrl+N and Ctrl+P for up/down movements, requesting configurable keybinds - #3626: Reports Emacs style navigation keybindings (Ctrl+n and Ctrl+p) not working in menus after TUI rewrite Feel free to ignore if none of these address your specific case.
Author
Owner

@alanxoc3 commented on GitHub (Oct 31, 2025):

Agreed! ctrl+p and ctrl+n are really useful defaults that I was using too. Especially for terminal-centric people. Please make them work as up and down again.

And I liked that all "open code" specific bindings had that ctrl+x prefix like emacs.

@alanxoc3 commented on GitHub (Oct 31, 2025): Agreed! ctrl+p and ctrl+n are really useful defaults that I was using too. Especially for terminal-centric people. Please make them work as up and down again. And I liked that all "open code" specific bindings had that ctrl+x prefix like emacs.
Author
Owner

@alanxoc3 commented on GitHub (Oct 31, 2025):

looks like this case has duplicates according to github actions

@alanxoc3 commented on GitHub (Oct 31, 2025): looks like this case has duplicates according to github actions
Author
Owner

@thdxr commented on GitHub (Oct 31, 2025):

not sure how we'll rework defaults but i added keybinds for history_next and history_previous so you can override. can change the one for command_list too

@thdxr commented on GitHub (Oct 31, 2025): not sure how we'll rework defaults but i added keybinds for history_next and history_previous so you can override. can change the one for command_list too
Author
Owner

@ariane-emory commented on GitHub (Oct 31, 2025):

Super, awesome! I'm not too concerned about what the default is as long as it can be overridden, always happy to override stuff to suit my preferences in my own config.

@ariane-emory commented on GitHub (Oct 31, 2025): Super, awesome! I'm not too concerned about what the default is as long as it can be overridden, always happy to override stuff to suit my preferences in my own config.
Author
Owner

@jdanbrown commented on GitHub (Nov 3, 2025):

not sure how we'll rework defaults but i added keybinds for history_next and history_previous so you can override. can change the one for command_list too

I encountered a bug trying to use ctrl+n for history_next:

@jdanbrown commented on GitHub (Nov 3, 2025): > not sure how we'll rework defaults but i added keybinds for history_next and history_previous so you can override. can change the one for command_list too I encountered a bug trying to use `ctrl+n` for `history_next`: - https://github.com/sst/opencode/issues/3850
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2406