Mail Archives: djgpp/1993/05/18/05:59:30
I've been experimenting with Csaba Biegl's event queue library, and
I'm impressed by it, but I have been unable to ever receive any
keyboard events (although mouse events work fine).
For what it's worth, I'm running DOS 6.0 on a Dell 466/L. This Dell
machine did not originally come with DOS installed on it, so it's
possible I'm missing a magical Dell-supplied driver or something (I'm
new to DOS; can you tell? :-). Enclosed is a small test program to
demonstrate my problem; I believe it should exit as soon as any key
is pressed, but it hangs forever.
Any help would be appreciated. Thanks!
-Mat
#include <stdio.h>
#include "eventque.h"
int
main (int argc, char *argv[])
{
EventQueue *q;
EventRecord e;
/* Initialize the event queue - only look for kbd events. */
q = EventQueueInit (100, 0, NULL);
q->evq_enable = EVENT_ENABLE (EVENT_KEYBD);
/* Loop until we get any event. */
while (!EventQueueNextEvent (q, &e))
;
/* Clean up. */
EventQueueDeInit ();
return 0;
}
- Raw text -