Putty Keyboard Problem - Shift Tab

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hey folks,

I have been investigating a small issue that I have with Putty 0.60
since I started using it for my ssh/telnet sessions.
Been playing around with a lot of settings to find a solution, but no
luck yet ...

Using putty to connect to linux machines via ssh e.g. I am of course in
need of auto completion on the linux shell.
Basically auto completion works, except for when you hold down the shift
key while pressing TAB to autocomplete.
Other terminal clients can do this just fine, e.g. Teraterm or
Cygwin/rxvt. No problems there with using shift-tab.
I really can't imagine that no one ran into that "problem" before. But
it's hard to find any comments regarding this issue with putty on the web.
Especially when you have a lot of Upper-Case only files or directories,
that you want to auto complete with TAB this can get very annoying,
since you type the first few letters of the directory e.g. while holding
down shift, and usually don't let it go when pressing TAB to complete it.
Maybe someone here can help me with this. Putty gives me everything I
need from a terminal client. Finding a solution to this would be great.



Re: Putty Keyboard Problem - Shift Tab

Quoted text here. Click to load it

It isn't at all clear from your report - you should make a habit of
stating precisely what you see and also explicitly stating what you
expected to see - but it _sounds_ as if you're expecting Shift+Tab
to do exactly the same thing as just pressing Tab without Shift. Is
that right?

PuTTY deliberately doesn't do this, because users _requested_ that I
turn Shift+Tab into a distinguishable control sequence, so that
applications which were displaying on-screen forms could use Tab to
move through the form fields in one order and Shift-Tab to move
through them in the reverse order, as you'd expect from the
equivalent form interface in environments like the Windows GUI.

The unavoidable effect of this is that Tab and Shift-Tab must send
different control sequences to the server, otherwise such an
application wouldn't be able to tell them apart.

A simple solution at your end would be to reconfigure your readline
settings so that PuTTY's control sequence for Shift-Tab (ESC [ Z) is
treated the same way as the sequence for Tab (equivalent to Ctrl-I).
For instance, in bash, you could write

  bind '"\e[Z": complete'

or, as a more global approach (which would benefit all readline-
using applications instead of just bash, since things like gdb also
use completion) you could add the line

  "\e[Z": complete

to ~/.inputrc.
Simon Tatham         What do we want?        ROT13!

Re: Putty Keyboard Problem - Shift Tab

Hi Simon,

sorry if I didn't explain the problem clear enough, but I think you got
what I meant ...
Your explanation makes sense to me. I will try to use your workaround
and do the
respective bindings on one of my shells.

Thanks a lot for your support.


Simon Tatham wrote:
Quoted text here. Click to load it

Re: Putty Keyboard Problem - Shift Tab

Simon Tatham wrote:

Quoted text here. Click to load it

Works like a charm Simon :-) Put the above into /etc/inputrc and I am
all set ...
Thanks again,


Site Timeline