Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Shift+ENTER does not work? #7469

Answered by diraneyya
diraneyya asked this question in Q&A
Discussion options

Hello all.

I am really amazed by the experience of using code-server outside the browser (as a PWA) on Mac OS X. It seems like the pinnacle of remote development.

One minor issue that I have faced developing remotely like this is while using Claude Code, which allows you to use Agentic AI for development via a command line (CLI) tool. In order to be able to enter long prompts, you need to press Shift+ENTER, but this does not working either in the web or the in the PWA version.

Is there a way to make this work?

image
You must be logged in to vote

@code-asher I would like to thank you, once more, for your input. You were right! The issue is indeed solved by changing the keybindings file at the location you mentioned, which is:

~/.local/share/code-server/User/keybindings.json

There was no file at that location but when I created one and entered the following:

[
 {
 "key": "shift+enter",
 "command": "workbench.action.terminal.sendSequence",
 "args": {
 "text": "\u001B\u000A"
 },
 "when": "terminalFocus"
 }
]

I was indeed able to enter multi-line claude code prompts by pressing SHIFT + ENTER

I would like to hence credit you with the answer to this question and thank you again for yo...

Replies: 1 comment 3 replies

Comment options

I searched a bit online and found anthropics/claude-code#2754

Adding this to my keybindings seems to work for me:

{
 "key": "shift+enter",
 "command": "workbench.action.terminal.sendSequence",
 "args": {
 "text": "\u001B\u000A"
 },
 "when": "terminalFocus"
 }
You must be logged in to vote
3 replies
Comment options

Oh! That is a nice find!

I tried to edit the file located at ~/.config/Code/User/keybindings.json as instructed in this thread you pointed out anthropics/claude-code#2754, which seemed very promising, but it did not work still.

In desperation I also tried to restart code-server and searching for other locations in my home directory where such a file named keybindings.json could be residing, but I had no luck with that either.

YET, after experimenting a little bit more based on what I read in the thread you referred me to, I discovered that Option+ENTER allows me to achieve the desired action with Claude Code (moving to the next line within the prompt without executing it).

I changed the contents of the ~/.config/Code/User/keybindings.json file back to how it were before the edit and Option+ENTER still works.

So thank you! This is resolved.

Comment options

Glad you got something working!

Just FYI, that looks like the path for native VS Code's keybindings, code-server's default should be ~/.local/share/code-server/User/keybindings.json (unless you changed the data directory, in which case you can ignore me).

Comment options

@code-asher I would like to thank you, once more, for your input. You were right! The issue is indeed solved by changing the keybindings file at the location you mentioned, which is:

~/.local/share/code-server/User/keybindings.json

There was no file at that location but when I created one and entered the following:

[
 {
 "key": "shift+enter",
 "command": "workbench.action.terminal.sendSequence",
 "args": {
 "text": "\u001B\u000A"
 },
 "when": "terminalFocus"
 }
]

I was indeed able to enter multi-line claude code prompts by pressing SHIFT + ENTER

I would like to hence credit you with the answer to this question and thank you again for your very helpful input ❤️

Answer selected by diraneyya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /