• Advertisement

Archived

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

keyboard repeat time

This topic is 6523 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how could i set keyboard repeat time in directinput?

Share this post


Link to post
Share on other sites
Advertisement
You could use SetParametersInfo() to set the repeat time of the keyboard in Windows... which I would say would work for you game too...

Just take a look at the Win32 SDK and search for SetParametersInfo... you''ll find everything you need in there..

..-=ViKtOr=-..

Share this post


Link to post
Share on other sites
Umm... sorry I don''t think that works with DirectInput. With direct input you can get the keyboard state as often as you want but your not sent any messages so there''s no repeat possible. Your the one checking the variables for certain keys being pressed. In my game I just only check the keyboard every 150ms (I think could be 250ms). It''s seems to work well.
See ya,
Ben

Share this post


Link to post
Share on other sites
Yah I forgot, the whole idea of DIRECTinput is that it''s direct. It doesn''t bother with windows settings or configuration, you can do what you want. No matter how they''ve configured windows DirectInput will still respond the same.
See ya,
Ben

Share this post


Link to post
Share on other sites
DirectInput will not automatically handle repeat time for you. DirectInput only responds to state changes (press/release/move). SO, that means you have to handle repeats internally by storing the time-stamp of the last time you processed the input and reprocessing it when the state doesn''t change for some arbitrary period of time (whatever you want the repeat time to be). Ugh. That sentence was ugly.

Share this post


Link to post
Share on other sites

  • Advertisement