Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


glut & numpad key


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 bobatefrei   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 July 2001 - 04:00 AM

How could I detect if the numpad key are pressed? glut does not send message to the glutKey* or glutSpecialKey callback!

Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 23 July 2001 - 04:16 AM

If numlock is on, then glutKeyboardFunc/glutKeyboardUpFunc will register it. If it''s off, then glutSpecialFunc/glutSpecialUpFunc will register it.

#3 bobatefrei   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 July 2001 - 09:35 AM

That''s what I thought but... It doesn''t work!!! Verr Num off or on, glutKeyboardFunc/glutKeyboardUpFunc or glutSpecialFunc/glutSpecialUpFunc don''t register it!

Have you check on your computer?

#4 smitty1276   Members   -  Reputation: 560

Like
Likes
Like

Posted 24 July 2001 - 04:55 PM

glutKeyboardFunc will register ''1'' through ''9''

glutSpecialFunc will register GLUT_KEY_UP, GLUT_KEY_DOWN, GLUT_KEY_LEFT, or GLUT_KEY_RIGHT.

#5 smitty1276   Members   -  Reputation: 560

Like
Likes
Like

Posted 24 July 2001 - 04:58 PM

"glut does not send message to the glutKey* or glutSpecialKey callback"

That may be because those aren''t the callbacks... they''re supposed to be glutKeyboardFunc and glutSpecialFunc. You probably meant that, though, because I would imagine having the wrong function names would generate an error.

#6 bobatefrei   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 July 2001 - 08:58 PM

I use glutKeyboardFunc and glutSpecialFunc... If I write glutKey*, it is just because there is 2 set of functions (for key up and key down event).

I think my problem is due to my azerty keyboard (I''m french), but I don''t know how to solve it.

#7 smitty1276   Members   -  Reputation: 560

Like
Likes
Like

Posted 26 July 2001 - 09:46 PM

I suppose that could be part of the problem, but I doubt it. The OS gets all the keyboard info first, so by the time GLUT gets it all it is is an ASCII code. It shouldn''t know the difference.

Can you post some code?





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS