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,46a82ee84423d8fc X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: How do I make HOTKEYS in ADA? Date: 1996/10/07 Message-ID: #1/1 X-Deja-AN: 187334750 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: houdini.camb.inmet.com references: <3256B8C7.18F9@access.hky.com> organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-10-07T00:00:00+00:00 List-Id: Randy Kosarik (randyk@access.hky.com) wrote: : I need to know if I can get ADA to scan the keyboard and return the : ASCII value if a keystroke was made. This also cannot stop the execution : of the program and wait for . The "Get_Immediate" procedure in the Ada 95 Ada.Text_IO is designed to provide this, though it is still implementation-dependent whether on any given operating system, this capability is/can be supported. For Ada 83, or Ada 95 systems where Get_Immediate does not provide the desired functionality, you should be able to use pragma Interface (Ada 83) or pragma Import (Ada 95) to connect up to the appropriate underlying system call. Alternatively, your compiler may already come with a means of accessing this underlying operating system capability. : I have a project in my Software Engineering class and am learning ADA : on the fly. : Thanks in advance to any/all that gives advice on this!!! If you could specify the compiler and the hardware/OS platform, we could probably provide more help. You should also consult whatever literature is available on the compiler you are using, especially if it is an Ada 83 compiler. For Ada 95, Ada.Text_IO.Get_Immediate should do the trick, if the underlying O/S supports it. : -Randy -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Cambridge, MA USA