Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Correct way to detect F1 Date: Mon, 29 Jan 2018 20:01:38 -0800 Organization: None to speak of Lines: 35 Message-ID: References: <800430537@f122.n1.z21.fsxnet> <0omv6dhece0dqu53n2crr4jap2rq52ic5l@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="7ddcc30ca01cb284a916e14962b637cc"; logging-data="10697"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+K7kh9dUIPGP0F8TNP5o1r" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:zI+6K5G99d8ygW/H2g4jVowdsWg= sha1:p56oZOC3AzFpwwTIeexOIoOkWYk= Xref: csiph.com comp.lang.c:125978 Robert Wessel writes: > On Mon, 29 Jan 2018 21:03:41 -0000 (UTC), ais523 > wrote: >>Keith Thompson wrote: >>> The sequence sent by F1 can vary depending on what kind of terminal >>> you're using, though (almost?) all terminal emulators these days >>> use VT100-like sequences by default. >> >>This is a problem with F1 in particular, though. The VT100's physical F1 >>key is interpreted directly by the terminal itself and can't be >>intercepted by software. As a result, terminal emulators that use >>VT100-like sequences don't generally agree on what code should be used >>for F1 (because they can't just copy from a VT100 as it didn't have one). >> >>Note also that similarly to a VT100, some terminal emulators will use F1 >>for their own purposes (e.g. showing a help screen), rather than passing >>it on to an application running inside the terminal emulator. > > Well a VT220 doesn't have an F1 key at all, the first key on the top > row is "hold screen". And none of the first five keys on the top row > are really programmable, as are the sixth (and subsequent) keys (which > start with F6). > > I have seen emulators map the PC keyboard's F1 key to the VT220 "Help" > key, which is a user definable key often called F15. The Wikipedia article on the VT220 has a photo of one with a keyboard that definitely has a key labeled "F1". I think the label strip might be replaceable. I'll take your word for the rest of it, though. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"