[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [MiNT] Detecting whether a key is pressed



On Fri, 2 Jul 1999 11:53:46 +0200, Julian Reschke wrote:

> > 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.

But there should definitely be one, as it would make it a lot easier 
to write clean games. Simple joystick-support would also be nice.

> > To clarify, I do not need to know when a key is pressed or released; only
> > whether it is currently pressed or released.

What if MiNT maintained a table of the status for each key? A system-
call (e.g. Ssystem()) could return a pointer to this table, and all 
you had to do then would be to check the status of keytable[scancode] 
when needed. I guess this can be implemented as a XDD as well.


/*
** Jo Even Skarstein    http://www.stud.ntnu.no/~josk/
**
**    beer - maria mckee - atari falcon - babylon 5
*/