keyboard repeat time

Started by
3 comments, last by vw 24 years ago
how could i set keyboard repeat time in directinput?
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=-..
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
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
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
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
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.

This topic is closed to new replies.

Advertisement