[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to handle keyboard input
- To: Linux Games <linuxgames@sunsite.auc.dk>
 
- Subject: How to handle keyboard input
 
- From: Mads Bondo Dydensborg <madsdyd@challenge.dk>
 
- Date: Thu, 27 Apr 2000 10:14:06 +0200 (CEST)
 
- Delivered-To: mailing list linuxgames@sunsite.auc.dk
 
- Delivery-Date: Thu, 27 Apr 2000 04:14:54 -0400
 
- Mailing-List: contact linuxgames-help@sunsite.auc.dk; run by ezmlm
 
- Reply-To: linuxgames@sunsite.auc.dk
 
Hey all.
Doing a game with OpenGL, using glutKeyboardFunc to get some
keypresses. However, this is not good:
a) Having to handle both KeyboardFunc and SpecialFunc, and *Up* funcs is 
   tiresome, and I have no garantee that a keydown will eventually
   generate a key up.
b) I can't handle multiple pressed keys.
I know absolutly nothing about coding in X. So, what is the preferred way
to handle keyboard/mouse/joystick input?
I have an idea that somehow these events should be handled by the same
logic, ie, I have one "stream" of events. Maybe I need to sample the mouse
and joystick regulary, but I don't mind.
Suggestions appreciated.
Mads
-- 
Mads Bondo Dydensborg.                               madsdyd@challenge.dk
Faced with the prospect of rereading this book, I would rather have my brains
ripped out by a plastic fork
                 - Charles Cooper, ZD net, in review of B@TSOT by Bill Gates.
---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk