I just installed Cygwin and the BACKSPACE functionality is not there, i.e. when I hit the Backspace key, I get a space. I've been trying to research this issue on Google, but did not find anything conclusive.

Hoped fellow stack*overflow* mates could help with specific solutions/directions.

This question came from our site for professional and enthusiast programmers.

Can you give more details of how you installed and invoked Cygwin, and where exactly the backspace key fails to work?
–
ak2Aug 30 '11 at 14:40

1

I'm guessing this is happening in the shell. What happens when you type control-V followed by backspace? And what's the output of the stty command?
–
Keith ThompsonAug 30 '11 at 17:57

What sort of keyboard do you have? US, UK etc.
–
pjc50Nov 7 '11 at 10:26

Did you ever resolve this? I'm seeing it now on my new Cygwin install, though it previously worked. It's worth noting that you aren't getting "a space": It's failing to move the cursor back to erase the character. The space you're seeing is the space that was supposed to stomp on the previous character. If you hit ^L you can see that backspace IS working. This is why stty isn't fixing things. It's almost like the CMD shell that Cygwin is bound to is failing to interpret cursor movement.
–
SomeCallMeTimMar 19 '12 at 22:30

Changing the TERM variable to cygwin and adding SET TERM=cygwin to the .bat file didn't work for me, but I fixed it. Here what I did: In package manager due installation I selected to install xterm: X11 terminal emulator, after installation I added SET TERM=xterm to the .bat file (like proposed above), launched terminal and in Options -> Terminal menu selected Type=xterm, then restarted terminal. Backspace started to work correctly!

Note: if you already installed cygwin – just run installer again and add xterm package.

I had the TERM environment variable set to msys via the Windows environment variable settings as suggested on StackOverflow to help with git problems on Windows. Simply resetting it to cygwin in .bashrc didn't help, but removing the TERM entry from the Windows settings did. Thanks for pointing me into the right direction!
–
Florian BruckerJul 26 '13 at 9:01

Simply run Cygwin setup again and reinstall termcap and terminfo. If you use the search box you can find them quickly. Instead of saying "Keep" for each, click it to make it say "Reinstall". You may have to check the "Hide Obsolete" checkbox for term to appear in the search.

I had a custom installed ncurses, that I removed. After removing and reinstalling via cygwin setup.exe I had this problem. I don't want to apply a bandaid by setting TERM variables to something other than what was working before my mishap. Reinstalling terminfo (I couldn't find termcap) worked for me. Thanks!
–
KelsinMar 6 '14 at 7:32

Thank you, this worked for me -- previously, in Vim, my backspace key was moving back along the line but was not clearing the letters until I started typing. Now it does the 'usual' backspace.
–
RobertMar 18 '13 at 11:50

Even am stuck on the same issue and from minty also backspace functionality is not working. I get space when i hit backspace on both minty terminal as well as cygwin terminal
–
RachelDec 9 '11 at 17:03

@Rachel Did you ever resolve this? I'm seeing the same issue with a fresh Cygwin install. :(
–
SomeCallMeTimMar 19 '12 at 22:31

@SomeCallMeTim: I was able to fix this issue by using Minty, cygwin behaves in very wierd manner at times.
–
RachelMar 20 '12 at 13:33

@Rachel Thanks, though I found out that my problem was that the Cygwin install missed some important files (like /usr/lib/terminfo). I don't know why they were missing; found someone else with that issue, went into setup and told terminfo and termcap to reinstall, and everything worked.
–
SomeCallMeTimMar 27 '12 at 22:39