Archived

This topic is now archived and is closed to further replies.

mrbastard

Key input using GLut

Recommended Posts

Hi there, I''m having a problem at the moment trying to get my prog to respond to multiple keypresses. The glut keyboard callback mechanism only passes one key at a time... I''ve thought of testing what the last key press was and if it was with a certain time of the current key press activating the multiple keypress response, but surely there''s an easier way? BTW I''m want my prog to stay multiplatform, which is why I''m using GLut, but I''m vaguely considering moving to SDL for the extra features... Would this ease my keyboard problem any? Thanks in advance for any help, Dan

Share this post


Link to post
Share on other sites
What is SDL? I have never heard of it. As to your origonal question i thought there was a callback for multi key events, but that might be wrong.

RELIGION IS THE ROOT OF ALL EVIL

Share this post


Link to post
Share on other sites
"What is SDL? I have never heard of it"
Simple Directmedia Layer - it basicly does everything Direct but can be run on linux etc as well as win32.

"i thought there was a callback for multi key events, but that might be wrong. "
Me too... I can only find GLutKeyboardfunc, Glutspecial func (for all keys), and glutGetmodifiers which is for detecting if shift etc ids pressed... unless you can specify which keys are classed as modifiers...hmmmmm. Its a bit vague in the LGut spec..


BTW hows this for freaky - my name is Dan Groom, you''re DanG. Spooky ;¬) OK not really that weird just made me laugh :¬)



Share this post


Link to post
Share on other sites
Aha! I''ve found a decent solution, just thought I''d share the link in case anyone has the same prob and finds this thread by search:

http://www.seul.org/archives/linuxgames/May-2000/msg00002.html

Share this post


Link to post
Share on other sites