Sign in to follow this  

WM_CHAR and Windows auto-repeat

This topic is 4394 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

Hmm... I'm modifying my input system in my game engine so that I can get standard character input (Before it was all Direct Input polling stuff). So, the WM_CHAR message is really nice, except that it's coming in really fast. Basically, when the user just taps the 'k' key, I get something like 12 WM_CHAR 'k' messages. I know that Windows has an auto-repeat function which can be set in the control pannel (Keyboard settings), which serves as the default behavior for all windows apps. My main question is this - Is there an easy way to use these autorepeat settings in my engine? Can I get windows to only generate messages to the pace of the autorepeat settings? Or should I write my own timer based system to do it? Thanks in advance for any help!

Share this post


Link to post
Share on other sites
WM_CHAR ought to follow the key repeat and delay values already. It's that what edit controls use for key input.

WM_KEYDOWN and WM_KEYUP on the other hand don't.

Check your windowproc and/or message pump if there's something wrong. WM_CHAR shouldn't come that fast.

Share this post


Link to post
Share on other sites

This topic is 4394 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.

Guest
This topic is now closed to further replies.
Sign in to follow this