X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <39813.25521.qm@web65713.mail.ac4.yahoo.com>
References: <39813.25521.qm@web65713.mail.ac4.yahoo.com>
Date: Wed, 26 Aug 2009 22:19:44 +0100
Message-ID: <416096c60908261419p65900777j738404ea4f8276d3@mail.gmail.com>
Subject: Re: mintty and readline mapping
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Vince Rice:
> I'm trying to map ctrl-tab in mintty and can't seem to get it working. I've Googled bash and key bindings, key mapping, etc., but haven't found anything that helps with the problem.

How about the mintty manual?


> I'm trying to bind ctrl-tab to reverse-menu-complete.

There's no standard for Ctrl+Tab, which is to say, xterm sends the
same as for plain Tab.

MinTTY sends "\e[1;5I" for Ctrl+Tab and "\e[1;6I" for Ctrl+Shift+Tab.


>>cat .inputrc
> # use ctrl-left/right to jump between words
> ";5C": forward-word
> ";5D": backward-word
>
> # enable inline completion
> TAB: menu-complete
> ";5C": forward-word
> ";5D": backward-word
> ";5I": reverse-menu-complete

Those are incomplete, i.e. you're relying on readline swallowing part
of the keycode.

Those should be:
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[1;5I": reverse-menu-complete

Have a look at the tips section of the mintty manual as well; it's got
some more key bindings you might want.

Andy

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

