2006-12-14 01:05:14

by Sergio Monteiro Basto

[permalink] [raw]
Subject: [Fwd: escape key]

-------- Forwarded Message --------
> From: James Lockie <[email protected]>
> To: [email protected]
> Subject: escape key
> Date: Tue, 12 Dec 2006 14:57:57 -0500
>
> I can't use the escape key to exit a menu with make menuconfig on
> kernel-2.6.19 or .1
> It works on 2.6.18. :-(
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-x86_64" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
S?rgio M.B.


Attachments:
smime.p7s (2.12 kB)

2006-12-14 05:47:09

by Randy Dunlap

[permalink] [raw]
Subject: Re: [Fwd: escape key]

On Thu, 14 Dec 2006 01:04:50 +0000 Sergio Monteiro Basto wrote:

> -------- Forwarded Message --------
> > From: James Lockie <[email protected]>
> > To: [email protected]
> > Subject: escape key
> > Date: Tue, 12 Dec 2006 14:57:57 -0500
> >
> > I can't use the escape key to exit a menu with make menuconfig on
> > kernel-2.6.19 or .1
> > It works on 2.6.18. :-(

Is this a problem?

You can exit a menu by selecting <Exit> and pressing Enter
or (as the help text at the top of the screen says:)
pressing <Esc><Esc> (2 times). Yes, pressing <Esc> one time
and then waiting for 1-2 seconds used to exit a menu.

One could argue that it has been "fixed" to match the help text.

---
~Randy

2006-12-14 06:19:32

by James

[permalink] [raw]
Subject: Re: [Fwd: escape key]

Randy Dunlap wrote:
> On Thu, 14 Dec 2006 01:04:50 +0000 Sergio Monteiro Basto wrote:
>
>
>> -------- Forwarded Message --------
>>
>>> From: James Lockie <[email protected]>
>>> To: [email protected]
>>> Subject: escape key
>>> Date: Tue, 12 Dec 2006 14:57:57 -0500
>>>
>>> I can't use the escape key to exit a menu with make menuconfig on
>>> kernel-2.6.19 or .1
>>> It works on 2.6.18. :-(
>>>
>
> Is this a problem?
>
> You can exit a menu by selecting <Exit> and pressing Enter
> or (as the help text at the top of the screen says:)
> pressing <Esc><Esc> (2 times). Yes, pressing <Esc> one time
> and then waiting for 1-2 seconds used to exit a menu.
>
> One could argue that it has been "fixed" to match the help text.
>
> ---
> ~Randy
>
>
Two escapes works now. :-)

2006-12-16 08:45:54

by Pavel Machek

[permalink] [raw]
Subject: Re: [Fwd: escape key]

Hi!

> >>>From: James Lockie <[email protected]>
> >>>To: [email protected]
> >>>Subject: escape key
> >>>Date: Tue, 12 Dec 2006 14:57:57 -0500
> >>>
> >>>I can't use the escape key to exit a menu with make
> >>>menuconfig on kernel-2.6.19 or .1
> >>>It works on 2.6.18. :-(
> >>>
> >
> >Is this a problem?
> >
> >You can exit a menu by selecting <Exit> and pressing
> >Enter
> >or (as the help text at the top of the screen says:)
> >pressing <Esc><Esc> (2 times). Yes, pressing <Esc> one
> >time
> >and then waiting for 1-2 seconds used to exit a menu.
> >
> >One could argue that it has been "fixed" to match the
> >help text.

> Two escapes works now. :-)

Actually could we fix our consoles, somehow, to make esc usable?
Having important key like esc unusable on consoles is quite ugly.

ioctl(console_fd, AM_I_IN_THE_MIDDLE_OF_ESCAPE_SEQUENCE_?) would do
the trick at least for vt consoles...
Pavel
--
Thanks for all the (sleeping) penguins.

2006-12-16 18:35:03

by Jan Engelhardt

[permalink] [raw]
Subject: Re: [Fwd: escape key]


On Dec 16 2006 08:45, Pavel Machek wrote:
>
>> Two escapes works now. :-)
>
>Actually could we fix our consoles, somehow, to make esc usable?
>Having important key like esc unusable on consoles is quite ugly.

It's something between a misdesign and a misconfiguration of the ESC key.

In other words, many unices make ESC generate ^[, the general
terminal escape character that is _also_ generated by keys like "up",
^[[A.

MS-DOS, or rather QBASIC's, Turbo BASIC's and other implementation of
keys, does not have this "bug": here ESC generates "\x1B" and "up"
generates "\x00H" IIRC. There is no key defined to generate "\x00".
=> All fits nicely.

So I see two steps:

- making ESC generate something else than ^[, or making function
keys do something else

- fixing the terminfo description and the xterms

- possibly creating a new termtype ("linux2" or "xterm2") so as to
not tamper with compatibility

Then text-console graphic applications (ncurses, slang, etc.) would
not need to wait the defined one second for an escape sequence to
complete.

HOWEVER, unix people probably _had a reason_ to make ESC generate
part of what function keys do. Should my UP key go broke, I could
still - though probably tedious - reproduce it by hitting the three
keys ESC [ A. Problem, as pointed out, is that ESC has long been used
by the majority of people back then for something else than doing
terminal sequences by hand: DOS, apps, games, Windows GUIs, and,
I suppose, even X11.



-`J'
--

2006-12-17 00:58:18

by Stephen Clark

[permalink] [raw]
Subject: Re: [Fwd: escape key]

Jan Engelhardt wrote:

>On Dec 16 2006 08:45, Pavel Machek wrote:
>
>
>>>Two escapes works now. :-)
>>>
>>>
>>Actually could we fix our consoles, somehow, to make esc usable?
>>Having important key like esc unusable on consoles is quite ugly.
>>
>>
>
>It's something between a misdesign and a misconfiguration of the ESC key.
>
>In other words, many unices make ESC generate ^[, the general
>terminal escape character that is _also_ generated by keys like "up",
>^[[A.
>
>MS-DOS, or rather QBASIC's, Turbo BASIC's and other implementation of
>keys, does not have this "bug": here ESC generates "\x1B" and "up"
>generates "\x00H" IIRC. There is no key defined to generate "\x00".
>=> All fits nicely.
>
>So I see two steps:
>
> - making ESC generate something else than ^[, or making function
> keys do something else
>
> - fixing the terminfo description and the xterms
>
> - possibly creating a new termtype ("linux2" or "xterm2") so as to
> not tamper with compatibility
>
>Then text-console graphic applications (ncurses, slang, etc.) would
>not need to wait the defined one second for an escape sequence to
>complete.
>
>HOWEVER, unix people probably _had a reason_ to make ESC generate
>part of what function keys do. Should my UP key go broke, I could
>still - though probably tedious - reproduce it by hitting the three
>keys ESC [ A. Problem, as pointed out, is that ESC has long been used
>by the majority of people back then for something else than doing
>terminal sequences by hand: DOS, apps, games, Windows GUIs, and,
>I suppose, even X11.
>
>
>
> -`J'
>
>
Hi,

do man ascii - ESC is 0x1b.
Thats what the esc key should generate - it sometimes echoed as ^[
because the [ = 0x5b

Steve

--

"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)

"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)



2006-12-17 09:42:22

by Jan Engelhardt

[permalink] [raw]
Subject: Re: [Fwd: escape key]


On Dec 16 2006 19:51, Stephen Clark wrote:
> Jan Engelhardt wrote:
>>
>> It's something between a misdesign and a misconfiguration of the ESC key.
>>
>> In other words, many unices make ESC generate ^[, the general
>> terminal escape character that is _also_ generated by keys like "up",
>> ^[[A.
>>
>
> do man ascii - ESC is 0x1b.
> Thats what the esc key should generate - it sometimes echoed as ^[ because the
> [ = 0x5b

Ok I hoped people would be smart enough to figure, but let me rephrase in two
ways:

Many unices generate "\x1b" (^[) for ESC, which is also generated by
keys like "up", which generates "\x1b[A" (^[[A)

>> MS-DOS, or rather QBASIC's, Turbo BASIC's and other implementation of
>> keys, does not have this "bug": here ESC generates "\x1B" and "up"
>> generates "\x00H" IIRC. There is no key defined to generate "\x00".
>> => All fits nicely.

And QB generates "\x1b" (^[) while "up" generates "\x00H" (^@H).


Hope this makes things more clear - I interchangably used the ^ and the \
notation. Sorry if that confused anyone.

-`J'
--

2006-12-18 04:11:38

by James Cloos

[permalink] [raw]
Subject: Re: [Fwd: escape key]

>>>>> "Jan" == Jan Engelhardt <[email protected]> writes:

Jan> HOWEVER, unix people probably _had a reason_ to make ESC generate
Jan> part of what function keys do.

You are looking at it backwards. The Escape key generates an ASCII
escape. The funtion keys (including the cursor keys) generate escape
sequences because the vt100 won out the title as the most ubiquitous
async serial terminal, and linux devs chose to have the console be
(mostly) vt100 compatable. As xterm, et al had done before.

The terminals (the actual hardware) used ASCII, so it was normal to
use Escape to initiate the sequences used by the function keys.

And that concept goes back a *lot* longer than unix. (Hmm. I can't
remember. Did TOPS-20 or its predecessor have glass terminals in the
day? I did get to use a DEC paper terminal a couple of times, but
that was connected to a VMS box back in the '80s; most of the time it
sat in the corner collecting dust....)

At any rate, given that Escape was used to initiate sequences sent to
the terminal for funtions such as moving the cursor around the screen,
clearing rows or cols, et al it must have only seemed natural to also
have it initiate sequences /from/ the terminal which did not fit into
standard ASCII. That was after all Escape's purpose in the ASCII std.

If you do want to change the console's terminal emulation, a good
first step would be to check whether any existing terminal already
uses something other than Escape to initiate function key sequences,
and, if so, promote that as the alternative to vt100-esque emulation.

Finally, note that the reason vt100 was chosen for the console was to
make it more useful for users who were physically at a linux box, were
logged in on the console, and from there logged in to remote servers.
That does remain something which the console *must* support.

-JimC
--
James Cloos <[email protected]> OpenPGP: 1024D/ED7DAEA6

2006-12-18 14:02:59

by Stephen Clark

[permalink] [raw]
Subject: Re: [Fwd: escape key]

James Cloos wrote:

>>>>>>"Jan" == Jan Engelhardt <[email protected]> writes:
>>>>>>
>>>>>>
>
>Jan> HOWEVER, unix people probably _had a reason_ to make ESC generate
>Jan> part of what function keys do.
>
>You are looking at it backwards. The Escape key generates an ASCII
>escape. The funtion keys (including the cursor keys) generate escape
>sequences because the vt100 won out the title as the most ubiquitous
>async serial terminal, and linux devs chose to have the console be
>(mostly) vt100 compatable. As xterm, et al had done before.
>
>The terminals (the actual hardware) used ASCII, so it was normal to
>use Escape to initiate the sequences used by the function keys.
>
>And that concept goes back a *lot* longer than unix. (Hmm. I can't
>remember. Did TOPS-20 or its predecessor have glass terminals in the
>day? I did get to use a DEC paper terminal a couple of times, but
>that was connected to a VMS box back in the '80s; most of the time it
>sat in the corner collecting dust....)
>
>At any rate, given that Escape was used to initiate sequences sent to
>the terminal for funtions such as moving the cursor around the screen,
>clearing rows or cols, et al it must have only seemed natural to also
>have it initiate sequences /from/ the terminal which did not fit into
>standard ASCII. That was after all Escape's purpose in the ASCII std.
>
>If you do want to change the console's terminal emulation, a good
>first step would be to check whether any existing terminal already
>uses something other than Escape to initiate function key sequences,
>and, if so, promote that as the alternative to vt100-esque emulation.
>
>Finally, note that the reason vt100 was chosen for the console was to
>make it more useful for users who were physically at a linux box, were
>logged in on the console, and from there logged in to remote servers.
>That does remain something which the console *must* support.
>
>-JimC
>
>
Also ansi came along and pretty much put their blessing on what DEC had
done and made the
escape sequences a standard.

Steve

--

"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)

"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)