PocketMatrix forums

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

Getting keydown events

I am new to GapiDraw and I am having difficulty getting key down events when I leave an arrow key pressed down.

With GAPI I can code it such that leaving an arrow key pressed down will continue to update the in game data, however with GapiDraw, I can only update the ingame data after I release the key.

Is this a programming problem of mine, or is it a limitation of GapiDraw?
There was an issue with GapiDraw 1.04 and button input on Pocket PCs. Make sure you are using 1.04b or 2.01b. If the issue still persists it is an error in your code.
I typically set a flag on StylusDown reset it on StylusUp, then monitor the flag in ProcessNextFrame for actions to be taken. This overcomes the hardware limitations in older devices, as well as limits the desire to put code in the input methods. You should have minimal code in StylusDown/Up/Move and KeyDown/Up so as not to bog down the response time.
Oh.. I see what my mistake was. I should use a flag to indicate that a key is pressed and reset the flag on keyup.

I thought that I could expect the keydown method to be called continually while the key was pressed down.