Shift+Enter No Longer Inserts a Newline and Submits Prompt Instead
What happened?
I am currently running the Gemini CLI on macOS (darwin). Previously, I could use the Shift+Enter key combination to insert a newline in the input field, which was essential for composing multi-line prompts or code snippets.
However, this functionality is now broken. Pressing Shift+Enter immediately submits the prompt, behaving the same as pressing Enter alone. This prevents me from creating multi-line inputs directly within the CLI, forcing me to use an external editor to prepare my text. This issue did not occur in previous versions.
What did you expect to happen?
I expected pressing Shift+Enter to insert a newline character into the input text area, allowing me to compose multi-line prompts or code directly within the Gemini CLI interface without submitting the prompt. The prompt should only be submitted when I press Enter by itself.
Client information
- CLI Version: 0.1.16
- Git Commit: 820169ba (local modifications)
- Operating System: darwin v22.14.0
- Sandbox Environment: no sandbox
- Model Version: gemini-2.5-pro
- Memory Usage: 280.3 MB
Login information
No response
Anything else we need to know?
No response
@dookwook-lee You can use Cntrl + J to make new line
Aslo try to me more shorcuts in the docs which will have the full list
On macOS, I nominally use option(⌥)+return to enter a line feed (this is generally a macOS universal keyboard shortcut). This has worked in gemini-cli, and still works on 0.1.16.
Yeah, this is a nuisance on Linux, as well, (at least for me on Fedora 42, alacritty, tmux) where I have to use Ctrl+J or the keypad Enter...
Can confirm this is an issue on Windows 11:
Enter Shift-Enter
Both behave the same an enter the command into gemini for execution/ai model thinking, can no longer use shift-enter to create a new line:
Strange:
Keyboard Shortcuts: │ │ Alt+Left/Right - Jump through words in the input │ │ Ctrl+C - Quit application │ │ Ctrl+Enter - New line │ │ Ctrl+L - Clear the screen │ │ Ctrl+X - Open input in external editor │ │ Ctrl+Y - Toggle YOLO mode │ │ Enter - Send message │ │ Esc - Cancel operation │ │ Shift+Tab - Toggle auto-accepting edits │ │ Up/Down - Cycle through your prompt history │ │ │ │ For a full list of shortcuts, see docs/keyboard-shortcuts.md │ │
Ok I see the controls where changed, this is highly inconsistent with how the web-browser based versions work, and also co-pilot app.
I would also recommend using enter to simply create new lines and instead use shift enter or even better control-enter to actually activate the gemini ai.
It can makes sense to "control" - "enter" the ai... ;)
This never worked out of the box. It only worked in some environments if you had existing setup to make shift+enter work.
This still does not work. I frequently submit a prompt I'm still in the process of writing because I accidentally hit Enter. I mean, even WhatsApp web has an option for this.
how can this be a duplicate if <shift>-<enter> still doesn't work? :)
should we open another issue to get more information?