From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,511884c4d439ef8 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: key strokes intercept Date: 1999/03/30 Message-ID: #1/1 X-Deja-AN: 460701060 Content-Transfer-Encoding: 7bit References: <370160f9.569041534@news.dsuper.net> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-30T00:00:00+00:00 List-Id: fluffy_puff@dsuper.net wrote in message <370160f9.569041534@news.dsuper.net>... >Hi, > >I'm taking a programming course, using Ada 95, and I've played with VB >and C++ before. In Visual Basic I could use some pre-defined >subprograms to control key strokes in real time (as they happened, as >opposed to after the key has been pressed): KeyDown, KeyUp, >KeyCode, stuff like that. > >How do I do this in Ada ? I just need sort of a starting point where >I can look for the info. I have a beginner level book that's pretty >good but doesn't touch this topic at all. I couldn't find anything >either in the online help I have. > There is a set of four Get_Immediate procedures defined in RM95 A.10.1 which get the next keystroke from either the Standard Input (usually the keyboard) or from an open text file, and either return when the next character is available, or set a Boolean variable indicating whether there was a new character available. The combinations of these options make up the four overloaded procedures. If you do not have the Ada95 Reference Manual (RM95), its available in Windows Help format on my FTP site in the directory ftp://ada95.com/pub/rm95-winhelp/ >What is "GNAT" ? GNAT is a freely-availabel compiler of the GNU family, with implementations on a wide variety of platforms -- various flavors of UNIX, Windows9X/NT, DOS, Macintosh, etc. The public versions produced by Ada Core Techoligies (ACT) are available at ftp://ftp.cs.nyu/edy/pub/gnat, while others done by volunteers are available at various places. >All I can say about the compiler I use is what the "About" box shows: >ObjectAda for Windows V7.1.105 (special edition) >Copyright (c) 1997, Aonix. > This is an edition included with various textbooks, but is limited in the size and complexity of the programs which it can produce. There is a commercial version available without the limitations.