🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #27391

Re: Control-F1, Alt-F1 ??? - (nf)

#27391
From: Vincent Manis
Date: Sat, 27 Jun 1987 15:52
35 lines
2353 bytes
In article <766@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes:

>> does anyone know, if there is a way to distinguish between
>> Functionkey F1, ALT-F1 and CTRL-F1 using C (MWC).
>...You tell the OS to put the shift key state
>in that byte by setting bit 3 in the (published) system variable "conterm"
>to 1 (that is, *(char *)0x484 |= 4;).  Better clear it again before
>your program exits, though, because the desktop might not be able to
>handle it (use *(char *)0x484 &= ~4;).

One slight point: "conterm" is in protected memory. You will get cherry
bombs if you do what Allan says without turning off protect. In MWC, the
way to do it is to use the peek and poke [sic!] functions.

\begin{flame}
This one is directed at IBM, not Atari, who merely copied IBM slavishly. 
I tried to write a routine which would let me read keystrokes in which the
ALT key sets the high bit of the code (thus letting you turn on extended 
graphics). What you do is to use only the scan code and shift bits, ignoring
the translated character; depending on the state of the shift bits, you use
one of three translation tables. It all worked nicely...until I tried 
ALT+digit. The codes in the tables are wrong. At first I thought it was yet
another BIOS bug, until I happened to notice in an IBM Tech Ref Manual the
same rules. Ugh.
\end{flame}

-----
Vincent Manis                {seismo,uw-beaver}!ubc-vision!ubc-cs!manis
Dept. of Computer Science    manis@cs.ubc.cdn
Univ. of British Columbia    manis%ubc.csnet@csnet-relay.arpa  
Vancouver, B.C. V6T 1W5      manis@ubc.csnet
(604) 228-6770 or 228-3061

"To lose one parent, Mr Worthing, may be regarded as a misfortune; but
to lose both looks like carelessness." -- Oscar Wilde
Technical Details
Message-ID: <1503@ubc-cs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-spam!ames!ptsfa!ihnp4!alberta!ubc-vision!ubc-cs!manis
References: <19400005@qtecmuc.UUCP> <766@atari.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-spam!ames!ptsfa!ihnp4!alberta!ubc-vision!ubc-cs!manis
From: manis@ubc-cs.UUCP (Vincent Manis)
Newsgroups: comp.sys.atari.st
Subject: Re: Control-F1, Alt-F1 ??? - (nf)
Message-ID: <1503@ubc-cs.UUCP>
Date: Sat, 27-Jun-87 11:52:21 EDT
Article-I.D.: ubc-cs.1503
Posted: Sat Jun 27 11:52:21 1987
Date-Received: Sun, 28-Jun-87 19:41:29 EDT
References: <19400005@qtecmuc.UUCP> <766@atari.UUCP>
Reply-To: manis@ubc-cs.UUCP (Vincent Manis)
Organization: UBC Department of Computer Science
Lines: 35