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: Matthew Heaney Subject: Re: key strokes intercept Date: 1999/03/30 Message-ID: #1/1 X-Deja-AN: 460690922 References: <370160f9.569041534@news.dsuper.net> NNTP-Posting-Date: Tue, 30 Mar 1999 01:24:03 PDT Newsgroups: comp.lang.ada Date: 1999-03-30T00:00:00+00:00 List-Id: fluffy_puff@dsuper.net writes: > 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 ? By using Ada.Text_IO.Get_Immediate. > 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. See RM95 A.10.7 (11). You're new to Ada, so what this means is RM95 - the Ada95 Reference Manual A - Annex A, the predefined packages A.10 - section A.10, which describes Text_IO A.10.7 - subsection A.10.7, I/O for strings and chars (11) - paragraph 11, the description of Get_Immediate, and also the loudest volume on Nigel Tufnel's amplifier There's a reference manual on-line at the ada home page. > What is "GNAT" ? The name of a zero-cost, high-quality Ada95 compiler. GNAT is a member of the gcc compiler family. Follow the Students link from their web page for more info. > 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. The student edition from Aonix is another free Ada95 compiler. You may find it helpful to read Ada95 source code written by an, um, expert in the language. I have converted every C++ example in the GoF design patterns book to Ada95, and have now started documenting concurrency idioms. You can subscribe to the ACM patterns list by sending the message (body) subscribe patterns to the ACM mailing-list server.