From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Sat, 26 Dec 2020 23:48:55 +0100 Subject: [maemo-leste] [PATCH] bootmenu: Allow to quit it via CTRL+C In-Reply-To: <20201226224230.xxmpfaf6ywbqsxuh@pali> References: <20201226180225.17563-1-pali@kernel.org> <20201226190356.au3njchffwtf3poe@pali> <0B7EC0F9-9371-4741-9863-2CA2AE0E437A@gmx.de> <20201226191540.cuajfctqfrmcp5l7@pali> <20201226223227.GA7436@amd> <20201226224230.xxmpfaf6ywbqsxuh@pali> Message-ID: <20201226224855.GB7436@amd> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi! > > > > >> >entry when CTRL+C is pressed. > > > > >> > > > > > >> >It is useful when bootmenu is part of boot process and you want to > > > > >> >interrupt boot process by scripts which control U-Boot (serial) > > > > >> >console. > > > > >> > > > > >> Wouldn't the escape key be a better choice? > > > > > > > > > >I can add also escape key. But has escape key stable ANSI sequence > > > > >which > > > > >is needed to catch? If you tell me which bytes to catch (for escape > > > > >key) > > > > >I will add it. > > > > > > > > 0x1b is Escape > > > > > > Does not work. 0x1b is not escape key. It is start of the ANSI escape > > > sequence which matches also existing keys up and down. > > > > Unfortunately, 0x1b _is_ escape key. That is long standing bug of > > vt100 terminal. > > Ok. And has xterm (or other terminals) somehow fixed it? Should we > expect that some other terminals send something different for ESC >key? Not really. Try it: pavel at duo:~$ cat | hexdump -C ^[ahoj 00000000 1b 61 68 6f 6a 0a |.ahoj.| 00000006 > > Usually timeout is used for detection. 0x1b followed by delay is > > escape key; 0x1b followed by [ is some other key. > > Any idea how long timeout should be used for this detection? > > Heinrich wrote in his patch that sequence of 0x1b 0x1b should be handled > by escape key. Does it mean that we need to handle both 0x1b+timeout and > also 0x1b+0x1b as a escape key? Or we should handle 0x1b+timeout or 0x1 > followed by any non '[' character as escape key? Yes, that makes some sense. 10msec would be right value for the timeout, I'd say. > Anyway, this bootmenu was initially written for Nokia N900 (used on LCD > display with integrated keyboard) and this device does not have ESC key. > So I would like to have CTRL+C in bootmenu working independently of ESC > key support. Or maybe "q" is good choice for the bootmenu? Best regards, Pavel -- http://www.livejournal.com/~pavelmachek -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: