[Feature] shift + enter to seperate prompt with another line
Hey @jason1015-coder - can you clarify what you need here? It's just Shift+Enter is already implemented into Nanocoder. Or, if you're in VS Code where shift is already bound you can use Option+Enter or Alt+Enter on windows
Hey @jason1015-coder - can you clarify what you need here? It's just Shift+Enter is already implemented into Nanocoder. Or, if you're in VS Code where shift is already bound you can use Option+Enter or Alt+Enter on windows
@will-lamerton I think what @jason1015-coder means is multi-line input support. Other tools like Claude Code & Gemini Cli support the key combination "Ctrl + J" to enter a newline in the user input area without sending the prompt to the tool. I think this is the feature that they are requesting but for the key combination "Shift + Enter".
@jason1015-coder Please confirm if I captured your requirements correctly.
Hey @jason1015-coder - can you clarify what you need here? It's just Shift+Enter is already implemented into Nanocoder. Or, if you're in VS Code where shift is already bound you can use Option+Enter or Alt+Enter on windows
@will-lamerton I think what @jason1015-coder means is multi-line input support. Other tools like Claude Code & Gemini Cli support the key combination "Ctrl + J" to enter a newline in the user input area without sending the prompt to the tool. I think this is the feature that they are requesting but for the key combination "Shift + Enter".
@jason1015-coder Please confirm if I captured your requirements correctly.
We already have multiline input support. Its Shift+Enter in most terminals and Alt/Option+Enter in V S Code. Unless I'm still missing something? 😅
We already have multiline input support. Its Shift+Enter in most terminals and Alt/Option+Enter in V S Code. Unless I'm still missing something? 😅
I just tested it & "Shift + Enter" didn't work for me !? It rendered "OM" character instead of switching to the new line.
However "Ctrl + J" did take the prompt into a new line. So maybe we need to update documentation ?
Tested in version 1.20.3.
Generally though the user chat input could use a few improvements such as copy pasting text into it renders it as [Paste #1: 29 chars] even for a few words. Ideally these should be displayed/rendered as it is...
@namar0x0309 Just FYI since you've assigned this to yourself.
We already have multiline input support. Its Shift+Enter in most terminals and Alt/Option+Enter in V S Code. Unless I'm still missing something? 😅
I just tested it & "Shift + Enter" didn't work for me !? It rendered "OM" character instead of switching to the new line.
However "Ctrl + J" did take the prompt into a new line. So maybe we need to update documentation ?
Tested in version 1.20.3.
Generally though the user chat input could use a few improvements such as copy pasting text into it renders it as
[Paste #1: 29 chars]even for a few words. Ideally these should be displayed/rendered as it is...@namar0x0309 Just FYI since you've assigned this to yourself.
Hm, interesting, which terminal are you using? Working on my end in Warp and VS Code respectively. This might have to be relabelled as a bug to look at. But yes, if CTRL+J works then perhaps we need to update docs. I am using MacOS so it's likely different for you.
In terms of pasting, I agree this could be improved, again, probably another issue to track. If content is so long it should be truncated like it is now but if it's short enough it shouldn't need that and should just display the whole pasted content. Literally mirroring Claude Code.
Hm, interesting, which terminal are you using? Working on my end in Warp and VS Code respectively. This might have to be relabelled as a bug to look at. But yes, if CTRL+J works then perhaps we need to update docs. I am using MacOS so it's likely different for you.
I'm using KDE Konsole in Arch Linux & Ghostty again in Arch Linux.
Hm, interesting, which terminal are you using? Working on my end in Warp and VS Code respectively. This might have to be relabelled as a bug to look at. But yes, if CTRL+J works then perhaps we need to update docs. I am using MacOS so it's likely different for you.
I'm using KDE Konsole in Arch Linux & Ghostty again in Arch Linux.
And CTRL+J works? Sounds like a doc update for Linux?
And CTRL+J works? Sounds like a doc update for Linux?
Yes CTRL+J works in both mentioned terminals. I think I might have an issue to enhance the user chat input area a bit, if the issue doesn't exist will create it, I can add a point in that issue to update the docs.
Is this fine with you ?
And CTRL+J works? Sounds like a doc update for Linux?
Yes CTRL+J works in both mentioned terminals. I think I might have an issue to enhance the user chat input area a bit, if the issue doesn't exist will create it, I can add a point in that issue to update the docs.
Is this fine with you ?
This works :)
Just to follow up!
After investigating, multi-line input is already implemented in the codebase.
Current Implementation
The following shortcuts are supported in source/components/user-input.tsx:
| Shortcut | Terminal Support |
|---|---|
| Shift+Enter | Works in terminals that properly send the shift modifier |
| Option/Alt+Enter | Works in VS Code integrated terminal |
| Ctrl+J | Works in many terminals (KDE Konsole, Ghostty, etc.) as it sends a literal newline character |
The Issue
The problem is that different terminals handle these key combinations differently:
- Some terminals (like KDE Konsole) render "OM" instead of recognizing Shift+Enter
- VS Code's integrated terminal uses a different escape sequence for Option+Enter
- Ctrl+J universally sends a newline character (
\n), which is why it works most reliably
Resolution
This is a documentation issue, not a code issue. We should update the README to include a keyboard shortcuts section documenting multi-line input with platform-specific notes.
Proposed documentation addition:
Keyboard Shortcuts
| Action | Shortcut | Notes |
|---|---|---|
| Submit prompt | Enter | |
| New line (multi-line input) | Ctrl+J | Most reliable across terminals |
| New line (multi-line input) | Shift+Enter | Terminal-dependent |
| New line (multi-line input) | Option+Enter | VS Code terminal |
| Toggle development mode | Shift+Tab | Cycles through normal/auto-accept/plan |
| Cancel AI response | Esc | While AI is processing |
I'll put up a PR with this documentation update shortly.
Hey @jason1015-coder - can you clarify what you need here? It's just Shift+Enter is already implemented into Nanocoder. Or, if you're in VS Code where shift is already bound you can use Option+Enter or Alt+Enter on windows
@will-lamerton I think what @jason1015-coder means is multi-line input support. Other tools like Claude Code & Gemini Cli support the key combination "Ctrl + J" to enter a newline in the user input area without sending the prompt to the tool. I think this is the feature that they are requesting but for the key combination "Shift + Enter".
@jason1015-coder Please confirm if I captured your requirements correctly.
Great, I did not worded it well
Just to follow up!
After investigating, multi-line input is already implemented in the codebase.
Current Implementation
The following shortcuts are supported in
source/components/user-input.tsx:
Shortcut Terminal Support Shift+Enter Works in terminals that properly send the shift modifier Option/Alt+Enter Works in VS Code integrated terminal Ctrl+J Works in many terminals (KDE Konsole, Ghostty, etc.) as it sends a literal newline character The Issue
The problem is that different terminals handle these key combinations differently:
- Some terminals (like KDE Konsole) render "OM" instead of recognizing Shift+Enter
- VS Code's integrated terminal uses a different escape sequence for Option+Enter
- Ctrl+J universally sends a newline character (
\n), which is why it works most reliablyResolution
This is a documentation issue, not a code issue. We should update the README to include a keyboard shortcuts section documenting multi-line input with platform-specific notes.
Proposed documentation addition:
Keyboard Shortcuts
Action Shortcut Notes Submit prompt Enter New line (multi-line input) Ctrl+J Most reliable across terminals New line (multi-line input) Shift+Enter Terminal-dependent New line (multi-line input) Option+Enter VS Code terminal Toggle development mode Shift+Tab Cycles through normal/auto-accept/plan Cancel AI response Esc While AI is processing I'll put up a PR with this documentation update shortly.
Not all of them works, it this varies bc of operating system ?
Just to follow up! After investigating, multi-line input is already implemented in the codebase.
Current Implementation
The following shortcuts are supported in
source/components/user-input.tsx:Shortcut Terminal Support
Shift+Enter Works in terminals that properly send the shift modifier
Option/Alt+Enter Works in VS Code integrated terminal
Ctrl+J Works in many terminals (KDE Konsole, Ghostty, etc.) as it sends a literal newline character
The Issue
The problem is that different terminals handle these key combinations differently:
- Some terminals (like KDE Konsole) render "OM" instead of recognizing Shift+Enter
- VS Code's integrated terminal uses a different escape sequence for Option+Enter
- Ctrl+J universally sends a newline character (
\n), which is why it works most reliablyResolution
This is a documentation issue, not a code issue. We should update the README to include a keyboard shortcuts section documenting multi-line input with platform-specific notes. Proposed documentation addition:
Keyboard Shortcuts
Action Shortcut Notes
Submit prompt Enter
New line (multi-line input) Ctrl+J Most reliable across terminals
New line (multi-line input) Shift+Enter Terminal-dependent
New line (multi-line input) Option+Enter VS Code terminal
Toggle development mode Shift+Tab Cycles through normal/auto-accept/plan
Cancel AI response Esc While AI is processing
I'll put up a PR with this documentation update shortly.
Not all of them works, it this varies bc of operating system ?
Indeed, operating system and the terminal you use :)