Discussion:
Putty Keyboard Problem - Shift Tab
(too old to reply)
Thorsten Peter
2009-03-09 09:08:15 UTC
Permalink
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.

thanks,

Thorsten
Simon Tatham
2009-03-09 10:45:08 UTC
Permalink
Post by Thorsten Peter
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.
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!
<***@pobox.com> When do we want it? ABJ!
Thorsten Peter
2009-03-09 12:13:19 UTC
Permalink
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.

Thorsten
Post by Simon Tatham
Post by Thorsten Peter
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.
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.
Thorsten Peter
2009-03-09 12:21:10 UTC
Permalink
Post by Simon Tatham
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.
Works like a charm Simon :-) Put the above into /etc/inputrc and I am
all set ...
Thanks again,

Thorsten

Continue reading on narkive:
Search results for 'Putty Keyboard Problem - Shift Tab' (Questions and Answers)
223
replies
Is someone watching me through my computer?
started 2015-02-15 03:59:11 UTC
security
Loading...