[FEATURE]: Desktop app - Ctrl+n/Ctrl+p shortcuts for prompt-input list navigation #7643

Closed
opened 2026-02-16 18:07:48 -05:00 by yindo · 6 comments
Owner

Originally created by @sairajchouhan on GitHub (Jan 26, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would like to add support for Ctrl+n and Ctrl+p to the PromptInput component in the web app, to make this consistent with how TUI works

  • Ctrl+n should behave like ArrowDown (select next item).
  • Ctrl+p should behave like ArrowUp (select previous item).
Originally created by @sairajchouhan on GitHub (Jan 26, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I would like to add support for `Ctrl+n` and `Ctrl+p` to the `PromptInput` component in the web app, to make this consistent with how TUI works - `Ctrl+n` should behave like `ArrowDown` (select next item). - `Ctrl+p` should behave like `ArrowUp` (select previous item).
yindo added the discussionweb labels 2026-02-16 18:07:48 -05:00
yindo closed this issue 2026-02-16 18:07:48 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 26, 2026):

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

  • #9718: Prefix-filtered prompt history navigation (requests Ctrl/Cmd + Up/Down for prompt history navigation)
  • #5062: Ctrl+R to search and navigate prompt history (related keyboard shortcut feature for prompt input)
  • #4997: Keybinds (comprehensive keybinds issue including references to Ctrl+N/P navigation)

Additionally, these are closely related feature requests in the same area:

  • #1764: Vim motions in input box
  • #9234: Readline-style text transformations for TUI prompt
  • #2520: Use Ctrl + arrow keys to move faster in prompt

Feel free to ignore if your specific case is not addressed by these issues.

@github-actions[bot] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #9718: Prefix-filtered prompt history navigation (requests Ctrl/Cmd + Up/Down for prompt history navigation) - #5062: Ctrl+R to search and navigate prompt history (related keyboard shortcut feature for prompt input) - #4997: Keybinds (comprehensive keybinds issue including references to Ctrl+N/P navigation) Additionally, these are closely related feature requests in the same area: - #1764: Vim motions in input box - #9234: Readline-style text transformations for TUI prompt - #2520: Use Ctrl + arrow keys to move faster in prompt Feel free to ignore if your specific case is not addressed by these issues.
Author
Owner

@sairajchouhan commented on GitHub (Jan 26, 2026):

I have the implementation for this ready and would be happy to open a PR

@sairajchouhan commented on GitHub (Jan 26, 2026): I have the implementation for this ready and would be happy to open a PR
Author
Owner

@ariane-emory commented on GitHub (Jan 26, 2026):

@sairajchouhan Couldn't these key bindings already be easily configured by the user in their opencode.jsonc file, should they desire them? Perhaps I've overlooked something, but I'm fairly confidant that they could be.

@ariane-emory commented on GitHub (Jan 26, 2026): @sairajchouhan Couldn't these key bindings already be easily configured by the user in their `opencode.jsonc` file, should they desire them? Perhaps I've overlooked something, but I'm fairly confidant that they could be.
Author
Owner

@sairajchouhan commented on GitHub (Jan 26, 2026):

@ariane-emory I don't see any way to customize Ctrl+N and Ctrl+P though. Also, those customizations seem to be always available. I want this to work to navigate through list items when I enter @ or /.

Image

@sairajchouhan commented on GitHub (Jan 26, 2026): @ariane-emory I don't see any way to customize Ctrl+N and Ctrl+P though. Also, those customizations seem to be always available. I want this to work to navigate through list items when I enter `@` or `/`. ![Image](https://github.com/user-attachments/assets/e2493aba-2b02-4bb6-ac92-85d3b0df7b6b)
Author
Owner

@ariane-emory commented on GitHub (Jan 26, 2026):

@sairajchouhan Ahh, I see that you may be referring to the desktop application! I'm less sure of how the bindings work there.

In the TUI, I actually have these exact bindings set up myself and they work perfectly. Despite what their names might suggest, they work in all the contexts you describe... however, the desktop app may be different, I'm not sure.

  "keybinds": {
    "history_next": "ctrl+n",
    "history_previous": "ctrl+p",
  },
@ariane-emory commented on GitHub (Jan 26, 2026): @sairajchouhan Ahh, I see that you may be referring to the desktop application! I'm less sure of how the bindings work there. In the TUI, I actually have these exact bindings set up myself and they work perfectly. Despite what their names might suggest, they work in all the contexts you describe... however, the desktop app may be different, I'm not sure. ```json "keybinds": { "history_next": "ctrl+n", "history_previous": "ctrl+p", }, ```
Author
Owner

@sairajchouhan commented on GitHub (Jan 26, 2026):

@ariane-emory yes, that works for me too, but I didn't even configure anything. It worked by default, so I expected it to work the same way in the desktop app.

@sairajchouhan commented on GitHub (Jan 26, 2026): @ariane-emory yes, that works for me too, but I didn't even configure anything. It worked by default, so I expected it to work the same way in the desktop app.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7643