PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

CGapiApplication::WindowProc

Code:

case WM_KEYDOWN:
if (!(lParam & 0x40000000))
{
GDKEYLIST keylist;
m_input.GetKeyList(&keylist;);
KeyDown(wParam, keylist);
}
return 0;



As the if statement above, when the key repeat event has been received the message is ignored.

Please let me know the reason why you did like that.
Because key repeat events are useless for frame-based applications such as games.

What you need to do is set a flag indicating what key is pressed. If you want something to happen when that key is pressed simply do a check in CGapiApplication::ProcessNextFrame().

Key repeat events are sent at an interval specified by the user. They don't say anything about how long the key has been pressed. Basically key repeat events are a quick-n-dirty solution to force applications such as word processors to update the cursor at the correct speed.