[comp.lang.c] Reading the keyboard

wsinpvb@eutrc3.urc.tue.nl (p.v.bemmelen) (08/13/89)

Hello
I am writing a program (in fact a game) that needs to read the keyboard.
Of course the standard method is not good enough because it has a delay
before the key starts repeating, and if you press multiple keys the result
is incorrect.
What i need is the following:
the user should be able to press multiple keys, and the program should
detect all of them, not just the last one pressed.
The program should read which keys are pressed at that moment, not which
have been pressed lately

I believe this requires programming of the keyboard controller, or reading portsdirectly. The language is Turbo Pascal 4,5 of 5.5, but examples in C or assembler are also welcome. Using the intr() function is no problem.

Greetings
wsinpvb@eutrc3.UUCP