fix mac os x terminal ssh delete key

Whenever I use terminal to ssh into my ubuntu linux setup on slicehost, my delete key turns into a “foward delete” key. This was too much for my brain for handle because deleting the character to the right instead of the left seemed so unnatural. After about 30 minutes of googling around, I finally found a hidden thread on fixing the terminal delete / backbase problem.

The solution is simple. Go into the “preferences” –> “settings” –> choose a theme –> “advanced” –> change “declare terminal as:” to “vt102”. Reboot terminal.

Fun, fun, fun.

  • THANK YOU!!!! This was driving me absolutely 100% nuts, crazy, !!!!!!!! Thank you so much.

    — joneszach

  • Glen

    This fix didn’t work for me. I recently switched to Mac (oh man, it’s a love/hate thing right now). I am on Snow Leopard which seems to be different as just about every Terminal keyboard fix out there doesn’t work. I had ‘del’ key problems, but I would get the ~ char when using the “forward delete” key on an SSH’d Ubuntu. To overcome this, in “Preferences” -> “Settings” -> choose a theme -> “Keyboard”, I had to map the:

    ‘forward delete’ to ctrl-d (04)

    BTW, to fix the home and end keys, I had to map them like this:

    ‘home’ to ctrl-a (01)
    ‘end’ to ctrl-e (05)

    Other odd tips:

    To fix home and end keys (to make them work like the PC), I tried various things with partial success. To fix them globally, I installed a neat program (not free unfortunately) called “Keyboard Maestro” (http://www.keyboardmaestro.com/main/). Best thing about this is that you can redefine the keyboard for various apps, so I was able to fix a specific problem in Thunderbird (shift page-up, page-down) which is working for other apps. Terminal was the main app that fell outside of its control (as it maps keys itself again). It does a few other slick things too, but I mostly use it to fix the home/end keys. Another program (DoubleCommand) didn’t work so well.

    Other thing I did to ease my switch-to-the-mac experience — upgraded to a Logitech Performance MX mouse (The mac mouse sucks, I don’t care what anybody else says). Damn this new mouse is sweet. Sure it works on glass, but more importantly is that latest Logitech drivers for Mac are excellent – I am able to use all 9 mouse buttons (yes – 9) for various things (like switching spaces, expose, dashboard, back button on browsers etc etc). Can specify app specific settings, have buttons trigger keyboard shortcuts etc.

  • Dave

    worked for me! Thanks!