comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: help abut function keys
Date: 1998/08/06
Date: 1998-08-06T00:00:00+00:00	[thread overview]
Message-ID: <ExAD57.Ar@jvdsys.nextjk.stuyts.nl> (raw)
In-Reply-To: 6qbvh5$2un$1@nnrp1.dejanews.com

jtapasai@my-dejanews.com wrote:
: I am learning ADA with GNAT 3.10 under Linux and my problem is :

: I usually used a function that returns an integer wich is the ASCII code
: of the pressed key. When the code is returned , I use a case when ...
: However, the F-keys have an special code.
: For example, F1 is ^]]A wich is 91 27 27 65 or something similar .

The 'special' key's on a PC's keyboard have no ansi code. Also, since
you are using linux, there is not even a garantee that the keyboard
used is in fact a PC keyboard. I'm writing this on a VT220 clone.

Assuming you can be sure your program will only run on a PC console
you can either use nested case statements to filter out the proper
keys, or write your own keyboard input function using your own
keyboard code type.

Jerry.
-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




  reply	other threads:[~1998-08-06  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-06  0:00 help abut function keys jtapasai
1998-08-06  0:00 ` Jerry van Dijk [this message]
1998-08-12  0:00 ` Do-While Jones
replies disabled

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