WM_CHAR and Windows auto-repeat

Started by
1 comment, last by jbadams 18 years, 4 months ago
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!
...
Advertisement
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.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

<a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=362436>Duplicate. Closed.

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement