Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!mit-eddie!genrad!decvax!decwrl!sun!imagen!atari!apratt From: apratt@atari.UUCP (Allan Pratt) Newsgroups: comp.sys.atari.st Subject: Re: Control-F1, Alt-F1 ??? - (nf) Message-ID: <766@atari.UUCP> Date: Thu, 25-Jun-87 13:32:00 EDT Article-I.D.: atari.766 Posted: Thu Jun 25 13:32:00 1987 Date-Received: Sat, 27-Jun-87 04:22:54 EDT References: <19400005@qtecmuc.UUCP> Organization: Atari Corp., Sunnyvale CA Lines: 29 in article <19400005@qtecmuc.UUCP>, ger@qtecmuc.UUCP says: > does anyone know, if there is a way to distinguish between > Functionkey F1, ALT-F1 and CTRL-F1 using C (MWC). > All routines like Bconin or Crawcin don't make a difference at all. What you need to remember is that the BIOS and GEMDOS calls return a LONG value. The highest byte of this value can contain the shift-key state when the key was hit. 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;). The upper byte is bit-mapped as follows (0 means up, 1 means down): Bit Key 0 Right shift 1 Left shift 2 Ctrl 3 ALT 4 Caps-lock (toggles with each press of the key) 5 Right mouse button 6 Left mouse button 7 Reserved, currently zero /----------------------------------------------\ | Opinions expressed above do not necessarily | -- Allan Pratt, Atari Corp. | reflect those of Atari Corp. or anyone else. | ...lll-lcc!atari!apratt \----------------------------------------------/ (APRATT on GEnie)