PocketMatrix forums

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

gdkeylist and the Axim x50v

vkA = E-mail button.
vkB = Home button.
vkC = Calendar button.
vkStart = Middle button (middle of D pad).

?? = Contact button.

If there's no GapiDraw method of accessing the contact key, does anyone know what the key code for it is off hand?
One recommendation is to let the user assign the keys at startup. Since each PDA has a unique combination of keys it's basically the most user-friendly solution (perhaps some users want to fire with their index finger?).
Johan wrote:One recommendation is to let the user assign the keys at startup. Since each PDA has a unique combination of keys it's basically the most user-friendly solution (perhaps some users want to fire with their index finger?).


Just so I understand, each PDA has a different number of keys, so it's too difficult to accommodate for all of them?

But at the very least, GapiDraw should accommodate for the 4 basic keys (home, email, calendar, contacts), right? Or are the keycodes different as well on each PDA?

You'll have to excuse my ignorance on this subject, the Axim x50v is my first PDA so I can't do testing of my own. The most important thing I'd like to know is whether or not the keycodes are different on each PDA. ie; the home keycode on the Axim x50v may be the email button on an Ipaq.
The way this is usually handled is an options screen... Basically you simply say to the user "ok, press the Fire button", they press some key, and you record the key code that comes in, whatever it is. From then on, that's your fire button. Do that for all the keys you want to define.

That's what Johan was talking about... Don't even look at them as eMail button, contacts button, etc., because this will vary from device to device, and the eMail on one may give you vkA, but vkB on another, and maybe a third device doesn't even have an email button.
fzammetti wrote:The way this is usually handled is an options screen... Basically you simply say to the user "ok, press the Fire button", they press some key, and you record the key code that comes in, whatever it is. From then on, that's your fire button. Do that for all the keys you want to define.

That's what Johan was talking about... Don't even look at them as eMail button, contacts button, etc., because this will vary from device to device, and the eMail on one may give you vkA, but vkB on another, and maybe a third device doesn't even have an email button.


Ah okay, that's what I thought he ment. I just wanted to be sure. I'll go ahead and program that into my game. Thanks for the info.
I think you guys confused me. :) I was under the impression that the same keys could have different keycodes on different devices (not email, etc., but in terms of key position - ie; the key all the way to the left).

But that's okay, it made me dig around the documentation. I found this:

http://msdn.microsoft.com/library/defau ... agemap.asp

I may not be able to look at the buttons in terms of email, contacts, etc., but I can look at the buttons on any device in this manner:

K1 K2 D-Pad K3 K4

Given the documentation:

K1 = 193
K2 = 194
K3 = 195
K4 = 196

The keys on any device read from left to right. I would expect GDKEYLIST vkA, vkB, etc. to coincide in the same manner:

K1 = vkA = 193
K2 = vkB = 194
K3 = vkC = 195
K4 = vkD = 196

Unfortunately it doesn't at all. Not only that, but there's no vkD for the fourth keycode. There's vkStart, but that's mapped to the button in the middle of the D-Pad.

Once you look at keys generically, you can get away without having to program an "options" screen. Arvale has done this. If you download the demo, and start playing the game, you'll notice that the keys coincide with the toolbar menu items. I = Item, K = Key:

I1 I2 I3 I4
K1 K2 K3 K4

This is exactly what I was looking for. If I am still incorrect, please correct me. :)
Well just to confuse things even further, be aware, on my Fujitsu Siemens Pocket LOOX 610 if you press and release the buttons quickly I receive the following double key codes:



K1 = 213 - 193
K2 = 210 - 194
K3 = 212 - 195
K4 = 209 - 196

However, when pressing and holding the buttons I get the following:



K1 = 213 - 193
K2 = 210 - 198
K3 = 212 - 195
K4 = 209 - 200

Note the changes in K2 and K4.
I assume the keydown would have the regular keycodes, but the keyup changes depending on how long you hold them?
InexorableTash · 19 Feb 2005, 04:38 UTC
FYI, the reason GapiDraw only exposes A, B, C is that the PocketPC-specific API it derives from - GAPI (Game API) provides device-independent lookup values for (you guessed it!) only 3 buttons - A, B and C.

Basically, PocketPC OEMs are able to ship a GAPI implementation with their devices and it's up to the OEM to decide what A, B and C should be for their device. Although nearly all PPCs today have the (1, 2, D-Pad, 3, 4) arrangement, my first PocketPC only had the D-Pad plus three buttons on the front of the device. Without dictating to the OEMs what hardware they had to ship, GAPI therefore must be a lowest-common-denominator sort of thing.

(What'd be nifty is some sort of abstraction that used a table in an external file which had all the known devices and key mappings, and this file could be updated. Failing that, an options screen seems like a good idea.)