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

In Ghostty, arrow keys not working since 0.1.21 update

Open codemedic opened this issue 1 year ago • 38 comments

What happened?

The previous version used to work without any issues. This morning, I updated gemini to 0.1.21 and it started misbehaving.

I cannot use the arrow keys as before to go back in history or use it to select options for commands.

See the screen shot below.

Image

What did you expect to happen?

I expect the arrow keys to work as normal.

Client information

$ gemini /about

╭───────────────────────────────────────────────────────────╮
│                                                           │
│ About Gemini CLI                                          │
│                                                           │
│ CLI Version         0.1.21                                │
│ Git Commit          055fe46d                              │
│ Model               gemini-2.5-flash                      │
│ Sandbox             no sandbox                            │
│ OS                  linux                                 │
│ Auth Method         OAuth                                 │
│                                                           │
╰───────────────────────────────────────────────────────────╯

Login information

No response

Anything else we need to know?

I switched to Konsole and arrow keys do work there.

codemedic avatar Aug 14 '25 11:08 codemedic

well, this is related to my recent issue #6226 I think both are the same thing

Amadoabad avatar Aug 14 '25 11:08 Amadoabad

Same issue with kitty fwiw. Might be related to https://github.com/google-gemini/gemini-cli/commit/9c7fb870c1a7c80741fafdfc6837d4b92e373b2d

bluec0re avatar Aug 14 '25 14:08 bluec0re

Yes it is, patching packages/cli/src/ui/utils/kittyProtocolDetector.ts to always return false fixes it.

bluec0re avatar Aug 14 '25 15:08 bluec0re

@codemedic - can you try latest main. @jacob314 landed https://github.com/google-gemini/gemini-cli/pull/6304, and now arrow keys are working for me in both kitty and ghostty.

deepankarsharma avatar Aug 15 '25 18:08 deepankarsharma

@dconeybe I am unable to replicate the issue from your comment in https://github.com/google-gemini/gemini-cli/pull/6304#issuecomment-3192345585. I have tried with kitty + linux since in https://github.com/google-gemini/gemini-cli/pull/6304#issuecomment-3192339201 you refer to that being your setup. Could you let me know your kitty version, any customation you might have done in your kitty config and any other details about your setup that might help me investigate this.

deepankarsharma avatar Aug 15 '25 23:08 deepankarsharma

in my case everything related to keyboard is breaking. the keyboard is working on an already opened web browser but fails to runs on everything else (like opening a terminal) dwl, wayland

vaguinerg avatar Aug 16 '25 09:08 vaguinerg

I have the same experience: https://github.com/google-gemini/gemini-cli/issues/6375#issuecomment-3193506040

emilpriver avatar Aug 16 '25 12:08 emilpriver

same issue on kitty arrow keys not working

hassankhan2608 avatar Aug 16 '25 14:08 hassankhan2608

For any of the people reporting "me too" : have you tried latest main as suggested?

DinoChiesa avatar Aug 16 '25 14:08 DinoChiesa

For any of the people reporting "me too" : have you tried latest main as suggested?

yes i am on latest commit

hassankhan2608 avatar Aug 16 '25 16:08 hassankhan2608

@vaguinerg @emilpriver @hassankhan2608 Could you please give me details about the following and I will try to reproduce

  1. Terminal being used
  2. Active keyboard layout
  3. Locale being used
  4. Distro name and version

deepankarsharma avatar Aug 16 '25 16:08 deepankarsharma

@vaguinerg @emilpriver @hassankhan2608 Could you please give me details about the following and I will try to reproduce

1. Terminal being used

2. Active keyboard layout

3. Locale being used

4. Distro name and version

Terminal: xterm-kitty Keyboard Layout: us Locale: en_US.UTF-8 Distro: Arch Linux

hassankhan2608 avatar Aug 16 '25 17:08 hassankhan2608

@hassankhan2608 just tried this on arch (via cachyos) and kitty and could not replicate it. Could you run showkey -a and report back what you get when you press the arrow keys?

Here is what I get for the keysequence left-arrow up-arrow right-arrow down-arrow

> showkey -a

Press any keys - Ctrl-D will terminate this program

^[[D 	27 0033 0x1b
 	91 0133 0x5b
 	68 0104 0x44
^[[A 	27 0033 0x1b
 	91 0133 0x5b
 	65 0101 0x41
^[[C 	27 0033 0x1b
 	91 0133 0x5b
 	67 0103 0x43
^[[B 	27 0033 0x1b
 	91 0133 0x5b
 	66 0102 0x42

deepankarsharma avatar Aug 16 '25 17:08 deepankarsharma

@vaguinerg @emilpriver @hassankhan2608 Could you please give me details about the following and I will try to reproduce

  1. Terminal being used
  2. Active keyboard layout
  3. Locale being used
  4. Distro name and version
  1. Ghostty
  2. Swedish
  3. Swedish
  4. Arch Linux 6.15.9-arch1-1

emilpriver avatar Aug 16 '25 18:08 emilpriver

@emilpriver can you give me the output of showkey -a (once its open press left, up, right, and down arrow key in sequence)

deepankarsharma avatar Aug 16 '25 18:08 deepankarsharma

@hassankhan2608 just tried this on arch (via cachyos) and kitty and could not replicate it. Could you run showkey -a and report back what you get when you press the arrow keys?

Here is what I get for the keysequence left-arrow up-arrow right-arrow down-arrow

> showkey -a

Press any keys - Ctrl-D will terminate this program

^[[D 	27 0033 0x1b
 	91 0133 0x5b
 	68 0104 0x44
^[[A 	27 0033 0x1b
 	91 0133 0x5b
 	65 0101 0x41
^[[C 	27 0033 0x1b
 	91 0133 0x5b
 	67 0103 0x43
^[[B 	27 0033 0x1b
 	91 0133 0x5b
 	66 0102 0x42

  showkey -a

Press any keys - Ctrl-D will terminate this program

^[[A 27 0033 0x1b 91 0133 0x5b 65 0101 0x41 ^[[B 27 0033 0x1b 91 0133 0x5b 66 0102 0x42 ^[[D 27 0033 0x1b 91 0133 0x5b 68 0104 0x44 ^[[C 27 0033 0x1b 91 0133 0x5b 67 0103 0x43

hassankhan2608 avatar Aug 17 '25 03:08 hassankhan2608

@hassankhan2608 And just to confirm that is Left, Up, Right, Down ie left == ^[[A, up == ^[[B, right == ^[[D, down == ^[[C

deepankarsharma avatar Aug 17 '25 04:08 deepankarsharma

@hassankhan2608 And just to confirm that is Left, Up, Right, Down ie left == ^[[A, up == ^[[B, right == ^[[D, down == ^[[C

for the key sequence left-arrow up-arrow right-arrow down-arrow

^[[D 27 0033 0x1b 91 0133 0x5b 68 0104 0x44 ^[[A 27 0033 0x1b 91 0133 0x5b 65 0101 0x41 ^[[C 27 0033 0x1b 91 0133 0x5b 67 0103 0x43 ^[[B 27 0033 0x1b 91 0133 0x5b 66 0102 0x42

hassankhan2608 avatar Aug 17 '25 04:08 hassankhan2608

Interestingly that is the same as what I get as shown above. Any pointers to what window manager you are using? Is this wayland or xorg? Any other configurations you might have applied?

deepankarsharma avatar Aug 17 '25 04:08 deepankarsharma

I use Hyprland

(end-4 dots)

Edit : I also tried with kitty --config NONE

still same issue

hassankhan2608 avatar Aug 17 '25 04:08 hassankhan2608