Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!princeton!udel!rochester!cornell!uw-beaver!mit-eddie!ll-xn!cit-vax!elroy!jplgodo!wlbr!scgvaxd!trwrb!sansom From: sansom@trwrb.UUCP (Richard Sansom) Newsgroups: comp.sys.atari.st Subject: Re: Control-F1, Alt-F1 ??? - (nf) Message-ID: <1985@trwrb.UUCP> Date: Mon, 22-Jun-87 11:37:36 EDT Article-I.D.: trwrb.1985 Posted: Mon Jun 22 11:37:36 1987 Date-Received: Wed, 24-Jun-87 04:49:24 EDT References: <19400005@qtecmuc.UUCP> Reply-To: sansom@trwrb.UUCP (Richard Sansom) Organization: TRW EDS, Redondo Beach, CA Lines: 39 In article <19400005@qtecmuc.UUCP> ger@qtecmuc.UUCP writes: >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. Try this (I hope I haven't made any glaringly obvious errors - this is all from memory): --- cut here --- /* * This little program will display the key scan codes and the ASCII * character codes of the keys typed in at the keyboard. Exit by typing "Q". */ #include #include #define CON 2 main() { long lc; char scan, ascii; for (;;) { if (Bconstat(CON)) { lc = Bconin(CON); ascii = (char)(lc & 0xffL); scan = (char)((lc >> 16) & 0xffL); printf("scan = 0x%02x, ascii = 0x%02x\n", scan, ascii); if (ascii == 'Q') exit(0); } } } -- /////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ /// Richard E. Sansom TRW Electronics & Defense Sector \\\ \\\ {decvax,ucbvax,ihnp4}!trwrb!sansom Redondo Beach, CA /// \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////