This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Shift-Tab for Backwards Completion


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]