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

Re: How to handle keyboard input



From: Mads Bondo Dydensborg <madsdyd@challenge.dk>
>Doing a game with OpenGL, using glutKeyboardFunc to get some
>keypresses. However, this is not good:
>(snip)
>I know absolutly nothing about coding in X. So, what is the preferred way
>to handle keyboard/mouse/joystick input?



Under X, you would catch and process messages from the devices in
your event loop, for the most part it's very straightforward. I have pretty
complete keyboard support in my toolkit which you can have a look at
if you like: it's at http://www.379.com/gut/, and the files you want to
look at are Gut/Include/gut_input.h and Gut/Src/Input/input_x.cpp. I
haven't moved the mouse and joystick handling over yet, but they
should be there relatively soon.

Jason
379



---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk