Skip to content

Conversation

@StevenTCramer
Copy link

Fix keybind documentation: use return instead of enter

The keybind parser doesn't normalize enter to return, but the terminal sends key events as return. This causes keybinds using enter (like input_submit: "enter" and input_newline: "shift+enter") to silently fail.

Updated all instances of enter to return to match what the terminal actually sends and what the code expects internally.

Fix keybind documentation: use return instead of enter
The keybind parser doesn't normalize enter to return, but the terminal sends key events as return. This causes keybinds using enter (like input_submit: "enter" and input_newline: "shift+enter") to silently fail.
Updated all instances of enter to return to match what the terminal actually sends and what the code expects internally.
@Ruagewei
Copy link

Ruagewei commented Dec 9, 2025

Hello, I've already modified the return but the problem still persists. Why is that?

@kommander
Copy link
Collaborator

@StevenTCramer newer versions should actually alias return/enter both ways.

@Ruagewei
Copy link

Ruagewei commented Dec 9, 2025

@StevenTCramer newer versions should actually alias return/enter both ways.

When I’m using the OpenCode extension in VS Code, neither the Return key nor the Enter key works. What’s causing this issue? I tried setting Shift + Enter to insert a new line, but it still doesn’t work — the only thing that works is Control + J.

@kommander
Copy link
Collaborator

@Ruagewei the issue is that xterm.js that is used in vscode does not support alternate keys/modify other keys, neither CSI u nor kitty keyboard. There is no way to get modifiers for the enter/return key, so the terminal always just sends \r. The only way is to setup a custom key binding in the vscode config to send \n for shift+enter.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants