delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/21/06:20:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-AuthUser: gerrit:koeln.convey.de
Date: Thu, 21 Aug 2003 12:19:53 +0200
From: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de>
Reply-To: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <113239815566.20030821121953@familiehaase.de>
To: Ian Brandt <ian AT ianbrandt DOT com>
CC: Cygwin <cygwin AT cygwin DOT com>
Subject: Re: Map Backspace to ASCII DEL?
In-Reply-To: <3F444AC6.7090900@ianbrandt.com>
References: <3F444AC6 DOT 7090900 AT ianbrandt DOT com>
MIME-Version: 1.0

Ian schrieb:


> Hi,

> I've searched through the mailing list and have seen many posts related
> to backspace and delete behavior, so my apologies in advance for yet 
> another one, but I can't seem to find the answer I'm looking for in the
> archives.

> Currently it seems that the cygwin terminal sends ^H (ASCII BS, 0x08) 
> for backspace, and the VT220 Remove escape sequence (\E[3~, 0x1B5B337E)
> for Delete.  I'd like it to send ^? (ASCII DEL, 0x7F) so that ^H can be
> used by applications (e.g. emacs).  This is how I've always configured
> other terminal emulators that I've used, and it has worked well.

> I believe Cygwin just repeats what it gets from Windows.  Typically for
> the console this would changed via keymaps, but I don't see that Cygwin
> uses this.  I don't want to change my mapping in Windows as obviously 
> that would mess up my native environment.  Is there a low level way to
> change the keymap for Cygwin?  If not is there a source hack I could 
> implement (and if so where in the source should I look)?

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.


Gerrit
-- 
=^..^=


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019