From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Using Get_Immediate to read keystrokes.
Date: 1998/08/26
Date: 1998-08-26T00:00:00+00:00 [thread overview]
Message-ID: <6s1615$20k@hacgate2.hac.com> (raw)
In-Reply-To: 98082016293577@psavax.pwfl.com
Marin David Condic, 561.796.8997, M/S 731-96 wrote in message
<98082016293577@psavax.pwfl.com>...
> So I got a request from a user to improve the behavior of a little
> command line oriented application. Currently the application uses
> Ada.Text_IO.Get_Line to read in commands. The user wants to use
> the up-arrow key to recover previous commands.
>
I see no evidence that this hasd been answered, so I'll tell you how I do
it.
I use Ada subprograms pragma-interfaced (is that a word?) to the tcgetattr
and tcsetattr functions. If memory serves me correctly, I have three
subprograms, viz.:
One is Set_Echo_Mode with an enumeration parameter (On, Off), and the other
two are called Save_Console_State and Restore_Console_State.
I got the Idea to use these functions from reading the a-sysdep.c file in
the gnat distribution.
Hope this helps,
David C. Hoos, Sr.
next prev parent reply other threads:[~1998-08-26 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <98082016293577@psavax.pwfl.com>
1998-08-26 0:00 ` Using Get_Immediate to read keystrokes John McCabe
1998-08-26 0:00 ` David C. Hoos, Sr. [this message]
1998-08-27 0:00 ` Jerry van Dijk
1998-08-26 0:00 ` John McCabe
1998-08-30 0:00 ` Dale Stanbrough
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox