Hello! I would really appreciate any hints to a little puzzle that has been gnawing at me about remote sessions with ssh... (and likely all connectivity programs...) Because network connections can only talk in ASCII, there is no way to tell the difference between TAB and "Ctrl-i" (i.e. pressing Ctrl and i keys together). BOTH are transmitted as same ASCII code. Likewise, Ctrl-m and RETURN key both are transmitted as the same ASCII character by ssh and every other network connection probably. Is there ANY way to tweak ssh program or something else so that something DIFFERENT is sent to distinguish between Ctrl-i and TAB and to distinguish between Ctrl-m and RETURN????? It would REALLY make my day. Sincerely, Chris -- ======================================================| Dr. Christian Seberino || (619) 553-7940 (office) | | SPAWARSYSCEN 2363 || (619) 553-2836 (fax) | | 53560 HULL ST || | | SAN DIEGO CA 92152-5001 || seberino at spawar.navy.mil | =======================================================
Chris-- ----- Original Message ----- From: "Chris Seberino" <seberino at spawar.navy.mil> To: <openssh-unix-dev at mindrot.org> Sent: Saturday, December 22, 2001 10:23 PM Subject: ssh> Hello! I would really appreciate any hints > to a little puzzle that has been gnawing at me > about remote sessions with ssh... > (and likely all connectivity programs...) > > Because network connections can only talk in > ASCII, there is no way to tell the difference > between TAB and "Ctrl-i" (i.e. pressing Ctrl and i keys > together). BOTH are transmitted as same ASCII > code. Likewise, Ctrl-m and RETURN key both > are transmitted as the same ASCII character > by ssh and every other network connection > probably. > > Is there ANY way to tweak ssh program or something > else so that something DIFFERENT is sent > to distinguish between Ctrl-i and TAB and > to distinguish between Ctrl-m and RETURN????? > > It would REALLY make my day. > > Sincerely, > > Chris > > -- > ======================================================> | Dr. Christian Seberino || (619) 553-7940 (office) | > | SPAWARSYSCEN 2363 || (619) 553-2836 (fax) | > | 53560 HULL ST || | > | SAN DIEGO CA 92152-5001 || seberino at spawar.navy.mil | > ======================================================>
Chris: Funny you mention this; I was looking into the possibilities of more detailed keyboard input some time ago. What can I say; I *really* want to play with the Half-Keyboard Patch( http://www.ugcs.caltech.edu/~john/computer/hk/) without having to sit at console. At some level, it's absolutely possible for at least PC hardware to detect keypresses independent of their ASCII codes -- think of all the PC games that use this capability to know that up, Z, and X are all pressed at once. What I don't know is whether or not there's a TTY mode that handles this. What's your use for this, out of curiosity? Yours Truly, Dan Kaminsky DoxPara Research http://www.doxpara.com P.S. Yes, that blank email was sent because of me experimenting with control combinations. Oops.
Chris Seberino wrote:> > Hello! I would really appreciate any hints > to a little puzzle that has been gnawing at me > about remote sessions with ssh... > (and likely all connectivity programs...) > > Because network connections can only talk in > ASCII,Ummm... Not sure why you say this. My network connections generally talk 8-bit binary that I sometimes choose to interpret as ASCII. :-)> there is no way to tell the difference > between TAB and "Ctrl-i" (i.e. pressing Ctrl and i keys > together). BOTH are transmitted as same ASCII > code. Likewise, Ctrl-m and RETURN key both > are transmitted as the same ASCII character > by ssh and every other network connection > probably.Well, this has nothing to do with network connections. It is generally more useful to use ASCII than keyboard scan codes.> Is there ANY way to tweak ssh program or something > else so that something DIFFERENT is sent > to distinguish between Ctrl-i and TAB and > to distinguish between Ctrl-m and RETURN????? > > It would REALLY make my day.If you're running X, have a look at xmodmap. Your X server knows about key press and release events. It also knows the difference between the tab key and control plus I. The xmodmap utility lets you control the translation between keyboard events and transmitted characters. Paul Allen -- Boeing Phantom Works \ Paul L. Allen, (425) 865-3297 Math & Computing Technology \ paul.l.allen at boeing.com POB 3707 M/S 7L-40, Seattle, WA 98124-2207 \ Prototype Systems Group