Key input using GLut

Started by
2 comments, last by mrbastard 22 years, 6 months ago
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
[size="1"]
Advertisement
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
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
"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 :¬)



[size="1"]
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
[size="1"]

This topic is closed to new replies.

Advertisement