-
Notifications
You must be signed in to change notification settings - Fork 6.2k
-
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?
imageBeta Was this translation helpful? Give feedback.
All reactions
@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
-
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"
}
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 1 -
❤️ 1
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 1
-
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).
Beta Was this translation helpful? Give feedback.
All reactions
-
@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 ❤️
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1