Map Backspace to ASCII DEL?

Ian Brandt ian@ianbrandt.com
Thu Aug 21 13:32:00 GMT 2003


Gerrit P. Haase wrote:
> I believe that this is already included in the FAQ, anyway:
> put a file called .inputrc into your home directory and add these lines:
> 
> # This file is read by the 'readline' library
> # (the library which bash uses for its command-
> # line editing facility)
> 
> # Make Home work
> "\e[7~": beginning-of-line
> # Make End work
> "\e[8~": end-of-line
> # Make Delete work
> "\e[3~": delete-char
> # make Insert work
> "\e[2~": paste-from-clipboard
> 
> # "\C-h": backward-delete-char
> # "\C-?": backward-delete-char
> 
> Backspace works for me out of thebox, so I cannot say which one will
> work for you.
> 
> This works for bash and probably other shells that use readline.

Hi Gerrit,

Thanks, but like stty this is too high level.  This only tells 
applications that use the readline library what to do when they receive 
a certain character or string from the terminal.  Readline, 
termcap/terminfo, and stty settings only change how the applications 
that use them react to a certain character/string.  I'm looking to 
change the character/string that is sent to them for a particular 
keycode.  In general it is a lot easier and there is a lot less to 
configure if the ASCII DEL character is sent for the Backspace keycode, 
and this also frees ASCII BS, or ^H, to be used by applications such as 
emacs.  I would like to use Cygwin as my terminal and via ssh access 
several different machines, so minimizing the configuration required at 
each system is important.  If I was on a Linux box I would accomplish 
this locally by changing the keymap using loadkeys, but this doesn't 
appear to be a part of the Cygwin port (and for all I know it may not be 
sensible on account of the Cygwin/Windows low-level details?).

Just FYI for more info see:

http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-2.html

Thanks,

Ian


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list