www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/06/20/06:18:32

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Thorsten Kampe <thorsten AT thorstenkampe DOT de>
Subject: Re: Shift-Tab for Backwards Completion
Date: Fri, 20 Jun 2008 12:17:30 +0200
Lines: 27
Message-ID: <g3g04b$asi$1@ger.gmane.org>
References: <e19dd6c40806190751i70d6846au8b6760346ecdd665 AT mail DOT gmail DOT com>
Mime-Version: 1.0
User-Agent: MicroPlanet-Gravity/2.70.2067
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

* Frank Jacobs (Thu, 19 Jun 2008 09:51:00 -0500)
> > Because Windows Console returns the same keycode for shifted/
> > unshifted and for the Ctrl key. You can easily test that with
> > [Ctrl][V] or "od -c" (which are the standards tools to find out the
> >  key codes to be able to assign actions to them).
> 
> Thanks. Yeah, I do notice that "od -c" yields different results as you
> said. When running in an xterm, "od -c" returns different codes for
> TAB and SHIFT-TAB. As you said, the standard Windows console window
> returns the same key code for the two keystrokes in "od –c".
> 
> Am I correct that getting this working (in the standard Windows
> console) is not going to be possible? Is there anyway way with I could
> somehow define a key assignment where it looks to see whether the
> SHIFT key is pressed whenever a TAB keycode occurs?

The terminal generates the keycodes (at least that's what I think). So 
if the terminal generates the same keycodes for shifted and un-shifted 
keys there is no way for the standard tools (readline in bash, zle in 
zsh) to distinguish these and to assign differenct actions to them.

The question is why you do have different actions for those in Cmd 
(which uses the same Windows terminal). Maybe because Cmd does not use 
the same "keycode" mechanism as the Unix terminal/shells. But that's all 
more or less guessing.

Thorsten


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