Repository navigation
CLI should support multi-line mode in input box #14
Description
Activity
Another feature is to allow picking from dropdown inside multi-line.
When you copy-paste, a multi-line prompt that contains
<SPEC> </SPEC>You should be able to insert a file with
@between the tags.My current workaround is to copy two empty lines into the clipboard and paste them into the input field.
That works so far.You could now create a keyboard shortcut in your terminal that is always activated when you are in Copilot CLI and acts with a paste of two empty lines when you press
Shift + Enter; just an idea for an improved workaround.- Reacted by esi, Michael Covello, Daniel Oyekunle, Benjamin Marwell, Zihao Chen, James Inman, Hemanuel Xafranski, Ashwin Sinha, Jan Krivanek, frengo-mol and 20 more
Since the initial release, I've just always been pressing
Ctrl+Enterinstead ofShift+Enterto insert newlines, and it works fine (on Windows at least). However, it's sometimes hard to remember to pressCtrl+Enterwhen I'm going back and forth between this and other programs which useShift+Enter. As such, it'd definitely be nice ifShift+Entersimply mapped toCtrl+Entersince that is more standard.Reacted by Zihao Chen, jmtdev0, rtj, Matteus Magnusson, Bert Verhelst and Asher AhsanReacted by Ashwin Sinha and Mr. ArmandoMulti-line input with Shift+Enter has shipped for terminals that support the Kitty protocol in 0.0.337 -- broader terminal support on the way!
Reacted by Robert Sundling, esi, Jack Stringer and Vincent KelleherReacted by Robert Sundling, Nao Yamada, nurulmashitah20-web and polikeijiMulti-line input with Shift+Enter has shipped for terminals that support the Kitty protocol in 0.0.337 -- broader terminal support on the way!
Excellent! And I'm sure you're aware that doesn't happen to include Windows, but I can confirm that
Ctrl+Entercontinues to work with Windows in 0.0.337, so we still have that workaround.We unfortunately had to move Kitty protocol support behind the
COPILOT_KITTYenvironment variable in 0.0.338 -- we had some reported regressions in VSCode on Windows and some paste problems. If you're unaffected by these roadblocks (or don't mind them), you can re-enable it by setting that environment variable totrue!For anyone else experiencing this issue on Windows, I found a simple configuration change which allows
Shift+Enterto be used for multi-line input in GitHub Copilot CLI in Windows Terminal. (This solves this issue for me.)The change configures Windows Terminal to send a linefeed character when pressing
Shift+Enter. In the GitHub Copilot CLI multi-line editor, a linefeed (\n) is treated as a newline whereas a carriage return (\r, the default character sent when pressingShift+Enter) submits the input.This involves adding a few lines to your Windows Terminal
settings.jsonfile. To find this file, open Windows Terminal, open "Settings" under the downward-pointing arrow at the top of the window, then click "Open JSON file" in the lower left.In the top-level
"actions"section, I added:{ "command": { "action": "sendInput", "input": "\n" }, "id": "linefeed" },This creates a new action called
linefeedwhich sends a linefeed character. In the top-level"keybindings"section, I added:{ "id": "linefeed", "keys": "shift+enter" },This binds
Shift+Enterto the newlinefeedaction. Note that if you copy and paste these as-is, paste them at the beginnings of the sections. Otherwise, be mindful of the trailing commas; if you add these to the ends of the sections, put the commas before these new entries rather than after.After saving this file,
Shift+Enterwill work for multi-line input immediately.Reacted by tzengshinfu, Rikki Gibson, Ping-Che Hsiao, Woldemar, Aaron Roney, Jorrit Stramer, Martin Arvedahl, jmlucjav and Debu ShinobiThe new
/terminal-setupslash command installs some keybindings into thekeybindings.jsonfile, but it doesn't respect the existing comments in this JSONC or JSON5 document, so after executing the command, thekeybindings.jsonis reformatted and without any comments.I think this slash command could be improved:
- Show a warning to the user about the removal of the comments, reformatting, and sorting of the keybindings, with a prompt if the user wants to continue.
- Prompt for creating first a backup of the existing keybindings.json file with a date+time ->
keybindings.json.bak-$(date +%Y-%m-%d_%H:%M:%S). - and use a JSON5 library or JSONC library, which can preserve comments in json documents with comments.
- Create or show a documentation with the keybindings setup for the terminal setup, which she/he can do manually to its
keybindings.jsonfile. - Or let AI do it 😆, but warn that you pay with a premium request 💃.
Hi folks! As of 0.0.342, we now support Shift+Ctrl for multiline input in terminals that support the Kitty protocol by default. We also support it in VSCode and its forks by running the
/terminal-setupcommand!@tobiashochguertel, I opened #325 to track this
I am unable to use Shift+Enter for multi-line input in the GitHub Copilot CLI when running it inside the VS Code Integrated Terminal on my macOS system. Pressing Shift+Enter immediately submits the prompt instead of inserting a newline.
I have already performed the following troubleshooting steps:
- executed
terminal-setup, and the output showed: 'Key bindings for VS Code are already set up. Your terminal already has multiline support with Shift+Enter and Ctrl+Enter.' - Checked VS Code Keybindings: I checked the VS Code Keyboard Shortcuts (JSON) file for any conflicting keybindings related to Shift+Enter (specifically those with a when condition related to terminalFocus). Even after modifying related terminal keybindings, the issue persists.
- Confirmed Environment: The issue is consistently reproducible.
Steps to Reproduce:
- Open the Integrated Terminal in VS Code.
- Run copilot to start the CLI session.
- Type a partial prompt.
- Press Shift+Enter (↑+Enter).
Expected Result: A newline character (\n) should be inserted.
Actual Result: The current prompt is submitted immediately.My Environment Details:
Operating System: macOS (Darwin arm64 25.0.0)
VS Code Version: Version: 1.105.1 (Universal)
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z
Copilot CLI Version: 0.0.351Integrated Terminal Shell: fish
Request for Guidance:
Could you provide guidance on how to configure the Copilot CLI or the VS Code Integrated Terminal on macOS to correctly send the linefeed (\n) character when Shift+Enter is pressed? Is there a known workaround or configuration file for macOS users?
Reacted by Tobias Hochgürtel, cc3374twa and Jiří Hofman- executed
I think it would really help to show the newline shortcut in the below line where it already shows Ctrl+c / Ctrl+r hints!
There's a bug where
/terminal-setupdoesn't work properly in Dev Containers or GitHub Codespaces - filed an issue here: #657Here's the workaround:
-
Activate Command Palette (
Ctrl+Shift+PorCmd+Shift+P) -
Select Preferences: Open Keyboard Shortcuts (JSON)
-
Insert the following into the JSON array:
{ "key": "ctrl+enter", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": { "text": "\\\r\n" } }, { "key": "shift+enter", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": { "text": "\\\r\n" } }
Reacted by Eric Ribeiro-

Currently, it's possible to paste or write multiple lines into the input box but it's impossible to navigate or use other keyboard shortcuts.
For example, I would expect
shift+enterto create a new line (or alternatively,enterto create a new line andshift+enterto submit)After pasting in content with multiple lines, I should be able to use the arrow keys to navigate the textual input, where currently it will start going through the command history.