Jump to content

  • Log In with Google      Sign In   
  • Create Account


Keyboard Input


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
2 replies to this topic

#1 Emagen   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 January 2000 - 07:05 PM

Hi ya - I''m having problems with getting data from the keyboard. When I press a key down and release, it print that character it prints a bunch of them. How do I get it so that it recognizes the button is pressed down and only one character should be printed. Im using GetDeviceState. and sending it to a char[]. Thanks all

Sponsor:

#2 BASSOFeeSH   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 January 2000 - 07:51 PM

I am guessing that you are checking the state each frame? If you are, then that is why it is showing so many of them. It checks so fast, that the key is still down before it hits the next frame. The only thing off the top of my head would to somehow only check once ever few frames, or a timer to see how long the key has been pressed. What I mean is...think in windows. If you hold a key down, it displays the key, waits, and then begins repeating. You would need to implement that waiting period to see if the user really means to hold down the key. Hope this helps.

BASSOFeeSH
><>

#3 crent   Members   -  Reputation: 122

Like
Likes
Like

Posted 30 January 2000 - 12:05 AM

You should use Buffered Input !
There you get exact description of when which key was pressed or released.

-crent-




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