comp.lang.ada
 help / color / mirror / Atom feed
From: clarkm@slab.pr.erau.edu (Michael Clark)
Subject: Re: How to read keys without <CR>, also, simulated GUI?
Date: Sun, 4 Apr 1993 00:41:14 GMT
Date: 1993-04-04T00:41:14+00:00	[thread overview]
Message-ID: <1993Apr4.004114.14343@ennews.eas.asu.edu> (raw)
In-Reply-To: 1993Apr2.094834.120157@marshall.wvnet.edu

  There are basically two methods for achieving "raw" character entries
from the keyboard.  I can speak only from use with Janus/Ada.  If you
just want to have the user hit a key (any key, for that matter) with
no real prescribed action, simple put a SKIP_LINE directly after the GET.
A better approach would be to the implementation dependencies of I/O.
The easiest way is to open a default "raw" keyboard file using the
following syntax :

       OPEN(KEYBOARD_FILE, OUT_FILE, "KBD:");

The "KBD:" is a special device name, which basically is a buffer
for the keyboard.  The file does not need to be CREATED, only OPENed.
You can then test the contents of the file (e.g. see what character
was hit) by using GET(KEYBOARD_FILE, CHARACTER) where CHARACTER has
been defined to an appropriate type.
   I have used this method several time, and if you need more infor
or sample source code, feel free to send me mail.

				- Mike Clark
				  Embry-Riddle Aero. Univ.
				  clarkm@slab.pr.erau.edu




      reply	other threads:[~1993-04-04  0:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-02 14:48 How to read keys without <CR>, also, simulated GUI? rcbi110
1993-04-04  0:41 ` Michael Clark [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox