[comp.sys.atari.st] Keyboard reading

neil@cs.hw.ac.uk (Neil Forsyth) (03/13/87)

My first piece of text on the net is a cry for help.

Problem: How can you test the status of a particular key on the keyboard?
Simple question you would think but I can't do it. (Does that make me a moron?)

The GEMDOS & BIOS calls concerning keyboard input either wait until a key is
pressed or give you a key if there is one in the buffer now. None as far as I
can make out request info on specific keys (Mouse & Joystick buttons are one
exception).

I've got a copy of "The Anatomy of the Atari ST", which I think is the UK
version of the Abacus book in the US. 
In this book it states that the 6301 keyboard processor's normal action is to
announce each keypress to the operating system (presumably on an interrupt
basis). When the key is pressed the key number is sent (1 - 117) and when it
is released it is sent again with the top bit set.
The book is unclear about where this information appears.
I have an idea to use a set of flag bits to show the status of some keys. These
flags would be updated by an interrupt routine reflecting the status of the top
bit if the correct keycode arrived.

Please, can anyone help me?                     _____
Thanks in advance.                             ! /  ! <- Cut here
             ____                              !/   O
      /\    /                                  !   /!\
  ---/  \  /---                                !   / \
____/    \/        Neil Forsyth               _!_

-- 
 Neil Forsyth			JANET:	neil@uk.ac.hw.cs
 Heriot-Watt University		ARPA:	neil@cs.hw.ac.uk
 Dept of C.S.			UUCP:	..!ukc!cs.hw.ac.uk!neil
------