[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Detecting whether a key is pressed
- To: MiNT Mailing List <mint@atari.archive.umich.edu>
- Subject: [MiNT] Detecting whether a key is pressed
- From: Mario Becroft <mb@tos.pl.net>
- Date: Fri, 2 Jul 1999 21:23:26 +1200
- >received: from localhost by tos.pl.net with smtp (Smail3.1.29.5 #1) id m10zzXa-0003CFC; Fri, 2 Jul 99 21:23 NZST
- Sender: owner-mint@fishpool.com
I have a particular requirement for GEM program, whereby it must be able
to determine whether a specified key is pressed at any time.
The AES only causes an event when a key is pressed, but not when it is
released, meaning that it is impossible to keep track of the state of a
given key.
I thought that I might be able to use MiNT's Psigintr function to cause my
program to be notified when data arrives from the keyboard. However I do
not believe this would work since although my program would be notified
that data had arrived from the keyboard, there would be no way to
determine what the data was.
An ideal answer would be some kind of system call or system variable which
reflects the current state of any key. However I do not believe there is
such a thing.
To clarify, I do not need to know when a key is pressed or released; only
whether it is currently pressed or released.
Does anyone have a suggestion as to how I could accomplish this, apart
from using a TSR program which monitors the status of the keys?
--
+-----------------------------------------------------------------------+
| Mario Becroft * Tariland, New Zealand Atari User Group |
| mb@tos.pl.net * Atari Hardware Developments |
| http://www.ak.planet.gen.nz/~mario/ * Atari Serial Mouse Interface |
+-----------------------------------------------------------------------+