How to prevent "enter" from sending text to Copilot chat and instead create a new line? #86624
-
Select Topic AreaProduct Feedback BodyWhen using Copilot chat, I often want to sent multiple lines of text. For example: Can you please explain to me what this code will do:
```python
name = 'sam'
print(name)
```To create a new line, I need to use Shift+Enter. I would prefer if I could configure Enter to create a new line, and Shift+Enter to send the input. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 13 replies
-
|
Here's a quick tutorial to achieve your desired behavior:
If this helped you, consider marking my answer as the "Accepted answer" 😄 |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
it seems the recent updates to copilot reset this for me, so I had to go back and redo it, but this still works as outlined above - thank you! |
Beta Was this translation helpful? Give feedback.
-
|
✅ Yes, successfully configured Copilot Chat to use Enter for new lines and Cmd+Enter to send. keybindings disable the default submit behavior and reassign submission to Cmd+Enter and Cmd+Shift+Enter. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you @SamEdwardes , your solution worked! This lack of easy new line capability was driving me crazy. Is there any way to vote or suggest that the default should be to NOT use I find weird that this is not the default. To submit the prompt, the default should be |
Beta Was this translation helpful? Give feedback.
-
|
now it's |
Beta Was this translation helpful? Give feedback.



Another update. I am now running this version of VS Code:
I have set up these bindings:
{ // Disable the default `enter` submit behaviour for GitHub Copilot chat { "key": "enter", "command": "-workbench.action.chat.submit", "when": "chatInputHasText && chatRequestIsPaused && inChatInput && chatMode == 'ask' || chatInputHasText && inChatInput && !chatSessionRequestInProgress && chatMode == 'ask' || chatInstructionsAttached && cha…