comp.lang.ada
 help / color / mirror / Atom feed
From: mfb@mbunix.mitre.org (Michael F Brenner)
Subject: Re: Here's a quicky - please help!
Date: 1997/05/08
Date: 1997-05-08T00:00:00+00:00	[thread overview]
Message-ID: <5ksern$a6t@top.mitre.org> (raw)
In-Reply-To: 01bc5a54$49a60120$9a82a6c3@swh2tpv


This is a bug in the Run-Time Library your are using. When a file is
connected to the keyboard it should be connected properly using a keyboard
interrupt and should already pass you byte codes for all cursor keys.

Unfortunately, this bug is endemic to several compilers in several languages,
and the vendors tend to justify it, giving their personal opinions that
this stuff should fail the way it fails, by design.

You can program direct access to the keyboard by calling operating
system primitives, like getkey, read_kbd_no_echo, DOS interrupt 21, 
BIOS interrupt 16#16#, or intercepting the keyboard interrupt yourself. 
The easiest is to call the operating system primitive using your
compiler-specific library. 

This would not be a problem if there was a single key code list such that
on every operating system and hardware, for example, control-up-arrow
always returned code 253, etc. Even Unicode (for foreign languages)
did not address the arrow keys, shift, control, alt (command), function
keys, etc.

In my opinion Ada should standardize such a key code list in an optional
package which can then start the process of being implemented everywhere.




      parent reply	other threads:[~1997-05-08  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01bc5a54$49a60120$9a82a6c3@swh2tpv>
1997-05-06  0:00 ` Reading from keyboard (was: Here's a quicky - please help!) Stephen Leake
1997-05-07  0:00 ` Here's a quicky - please help! Albert K. Lee
1997-05-08  0:00 ` Michael F Brenner [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