ESC -> ESC ESC in luser agent Unix shell
Thaddeus P. Floryan
thad at public.BTR.COM
Mon Mar 11 12:27:50 AEST 1991
In article <20005 at alice.att.com> wilber at homxb.att.com writes:
>
>When I'm in a Unix shell window created by the luser agent escapes get
>doubled. This of course makes Emacs impossible to use.
>
>Is there a way to fix this short of nuking the User Agent?
I first posted a problem-report regarding the double-ESCapes occurring after
using, say, CDraw 2.0 or several of the 3B1 graphics games.
Several people have looked into the problem and their fixes are included
below.
Thad Floryan [ thad at btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]
-------------------- begin enclosed material
= From: ahh at glyph.UUCP (Andy Heffernan)
= Newsgroups: unix-pc.general,comp.sys.att
= Subject: Re: Double-ESC
= Summary: TAM still hosed
= Date: 4 Jan 91 02:16:28 GMT
=
= Shortly before I left for the holidays I received some mail regarding
= the double-ESC problem. I sent mail back requesting another hint
= as I got stuck with the first one, but I haven't gotten a response
= yet so I thought I'd throw this out to unix-pc at large.
=
= To review the problem, some TAM programs will leave a window in
= a strange state where each press of the ESC key actually yields
= two ESC characters into the input stream. A program I have under
= development causes this to happen whenever it treats stdin as
= its input file. Getting input from a file named in the argument list
= causes no problems, but than SIGINTs aren't recognized (shades of VM/CMS --
= home of the Programs That Will Not Die).
=
= Enough of that, here's the hint I got (edited):
= "
= There's a flag (documented in /usr/include/sys/wd.h) that needs to be cleared.
= "
=
= ...and sure enough,
= $ grep ESC /usr/include/sys/wd.h
= #define ESC 1 /* received ESC (0x1b) */
= #define CSI 2 /* received CSI (ESC [) */
= #define WDESC 0x20 /* double esc flag */
= ^^^^^ ^^^^^^^^^^^^^^^
= Hey look! Hey look!
=
= According to the comments, this is a flag for the w_flags member
= of the windef structure. Well, this is lervly and everything,
= but where-oh-where does the windef chain(s) start?
=
= This constant beeping in vi is making me goofy.
=
= From: ssb at quest.UUCP (Scott Sheldon Bertilson)
= Newsgroups: unix-pc.general
= Subject: Re: Double-ESC
= Summary: WIOCSESC enables/disables it
= Date: 7 Jan 91 04:52:30 GMT
=
= Just fiddled a little and found that the WIOCSESC can be used
= to turn it off or on. Any non-zero argument enables it, and a
= 0 argument disables it:
= ioctl(0, WIOCSESC, 0); /* disable */
= ioctl(0, WIOCSESC, 1); /* enable */
-------------------- end enclosed material
More information about the Comp.sys.3b1
mailing list