gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Shift+Enter bug

Open pepedesigner opened this issue 1 year ago • 15 comments

What happened?

When I pressed 'Shift'+'Enter', I could not create a new line, it's a bug, please help to fix it.

What did you expect to happen?

When I pressed 'Shift'+'Enter', it should be new line.

Client information

  • CLI Version: 0.1.4
  • Git Commit: 1078a54
  • Operating System: darwin v24.1.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 288.3 MB

Login information

Google account

Anything else we need to know?

No response

pepedesigner avatar Jun 26 '25 14:06 pepedesigner

use ALT+ENTER

ACCGAGTT avatar Jun 26 '25 14:06 ACCGAGTT

Duplicate issue of #1753

ByteJoseph avatar Jun 26 '25 14:06 ByteJoseph

use ALT+ENTER

it's not working as well

pepedesigner avatar Jun 26 '25 15:06 pepedesigner

use ALT+ENTER

it's not working as well

what os are you running this on?

ACCGAGTT avatar Jun 26 '25 15:06 ACCGAGTT

what os are you running this on?

Mac (darwin v24.1.0)

ByteJoseph avatar Jun 26 '25 15:06 ByteJoseph

@pepedesigner Could you please try with Ctrl + J ? Also what terminal are you using the standard MacOS terminal, iTerm2 or the one in VS code?

devpool007 avatar Jun 26 '25 17:06 devpool007

This is coming soon : https://github.com/google-gemini/gemini-cli/pull/898

deepankarsharma avatar Jun 26 '25 17:06 deepankarsharma

use ALT+ENTER

it's not working as well

Image

Based on the provided image, "Esc+" is a setting for the "Left option (⌥) key".

In the context of terminal emulators or applications where key bindings are highly customizable, "Esc+" often means that the Option key (⌥) will send an Escape character followed by another character when pressed in combination with other keys.

This is a common way to emulate the behavior of a Meta key or Alt key on Unix-like systems that don't natively have one. When "Esc+" is enabled, pressing, for example, Option-F might send Esc followed by f. Many command-line applications and text editors (like Emacs or Vim) interpret Esc followed by a character sequence as a special command or an "Alt-key" combination.

Essentially, it's a way to expand the number of key combinations available for actions within the terminal.

jsu-sc avatar Jun 26 '25 17:06 jsu-sc

@jsu-sc Try Ctrl + J on you mac

devpool007 avatar Jun 26 '25 18:06 devpool007

This is coming soon : #898

Hi @deepankarsharma so I went through it and I have been trying to analyse the various key bindings that work on various terminal and OS combinations. Have you finalised those?

If yes could you please brief them as I am trying to make changes in help component accordingly.

devpool007 avatar Jun 26 '25 18:06 devpool007

Having a definitive keybinding list per OS would indeed be very useful.

deepankarsharma avatar Jun 26 '25 18:06 deepankarsharma

On unix (I count osx as one too :) ) - Ctrl-J, Alt-Enter, Ctrl-Enter, and Shift-Enter should work after this CL lands.

Ah ok thanks! So from what I understand on unix side all of these options work or one of them might work depending on macOS or some linux distro ?

And on Windows side there is no change? and Shift + Enter should work? Though I would like to point out Shift + Enter didn't work for me on Windows

devpool007 avatar Jun 26 '25 18:06 devpool007

I will test on Windows later tonight and make sure Shift-Enter works on Windows in #898. If you have any desired key bindings, let me know and I will try to add them.

deepankarsharma avatar Jun 26 '25 18:06 deepankarsharma

I will test on Windows later tonight and make sure Shift-Enter works on Windows in #898. If you have any desired key bindings, let me know and I will try to add them.

Thanks please let me know the update then! Also could you see how it works inside the vscode terminal and just powershell/windows terminal as right now combinations Ctrl + Enter and Alt + Enter worked for me but not Shift + Enter

devpool007 avatar Jun 26 '25 18:06 devpool007

I will test on Windows later tonight and make sure Shift-Enter works on Windows in #898. If you have any desired key bindings, let me know and I will try to add them.

Thanks please let me know the update then! Also could you see how it works inside the vscode terminal and just powershell/windows terminal as right now combinations Ctrl + Enter and Alt + Enter worked for me but not Shift + Enter

update using Gemini in my Windows Terminal (both Powershell and Cmd) CTRL+ENTER works

ACCGAGTT avatar Jun 26 '25 20:06 ACCGAGTT