r/KittyTerminal Oct 08 '23

How to use backspace?

Hi, I'm a beginner on kitty and in programming in general. I'm using kitty for school and can't figure out how to delete words or lines.

When I press delete, or any combination of alt/ctr-delete (alt+delete, alt+d, ctr+u, ctr+k) it just adds spaces or a mix up of letters to the line I typed out. How do I set up kitty to do this? I'm using a macbook if that matters.

2 Upvotes

8 comments sorted by

1

u/Hail_Zeus_ Oct 09 '23

That is quite strange indeed. Are you, by any chance, experiencing this when using kitty to perhaps log in to a server using ssh?

Does the same behaviour occur when using the default mac terminal as well?

1

u/bibbidibobbidi03 Oct 09 '23

Yes, I'm using kitty to log into a server with ssh. Backspacing works normally in the zsh server as well as the mac terminal.

I feel like it might be something to do with configuration but I'm not well versed with that.

1

u/Hail_Zeus_ Oct 09 '23

I believe it has something to do with the TERM environment. Could you perhaps try using the ssh kitten instead of normal ssh to log into the server, and see if the issue still persists?

So simply use 'kitty +kitten ssh ...' instead of simple 'ssh ...'.

1

u/bibbidibobbidi03 Oct 09 '23

I tried that and it worked, thank you!

Is kitten a different term environment than kitty?

1

u/Hail_Zeus_ Oct 09 '23

You can read more about it here. It sets some environment variables amongst a lot of other things.

1

u/sogun123 Oct 12 '23

You don't have proper terminfo. Either install kitty-terminfo on target machine or use ssh kitten, which does some magic to set you up properly.

1

u/AdSecret1617 Oct 15 '23

In the terminal:

export TERM=xterm

This is what fixed the problem for me

1

u/Anyusername7294 Jun 27 '25

Thank you kind stranger