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

Appearance settings
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: 2 comments · 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
@diraneyya
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.

@code-asher
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).

@diraneyya
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
Comment options

For macOS users: Ctrl+J is the actual newline character. Just remap Shift+Enter → Ctrl+J and you're done.
If you use skhd (lightweight hotkey daemon), add this to ~/.skhdrc:
shift - return : skhd -k "ctrl - j"
Then skhd --reload. Works globally across all terminals (Ghostty, iTerm2, Terminal.app, etc.) with zero delay.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.