Bad key bindings over ssh from a mac

I encountered, for some time now, problems when connecting over ssh from my mac to a linux machine.
These problems were related to backspace/delete key in both nano and zsh the solutions I found today are :

For zsh type :

echo "bindkey ^? backward-delete-char" >> ~/.zshrc
echo "bindkey ^[[3~ delete-char" >> ~/.zshrc

WARNING : you should type these commands not copy/paste them, ^? sequence is obtained using ctrl+v then [backspace key].

For nano type :

## Fix Backspace/Delete confusion problem.
echo "set rebinddelete" >> ~/.nanorc

All should works now.

Sat, 23 Feb 2008 20:44 Posted in ,

  1. By Sutto 23/02/2008 at 22h14


    Thanks for the nano one – that’s been annoying me for a while :D

  2. By Benjamin Stiglitz 24/02/2008 at 18h19


    You can also change Terminal’s preferences to send ^H for a backspace instead of its usual sequence.

    In Leopard, under Preferences > Settings > Advanced, there’s an option called “Delete sends Ctrl-H.” Turn it on!

  3. By Jonathan Tron 24/02/2008 at 22h02


    Benjamin : hey another nice tips, thanks !

  4. By Ajit 25/02/2008 at 13h44


    These are great solutions. They work perfectly without me having any problems, without having to debug anything else.

  5. By Matt 08/04/2008 at 20h16


    Thanks!

  6. By Arild 26/05/2008 at 03h40


    Thanks… knew it would either be a stty or bindkey. You saved me some time!

Comment Bad key bindings over ssh from a mac


RSS