This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Key Mappings


Key Mappings

Postby Presto » Apr 28, 2003 @ 11:07pm

I just wrote a key-remapper for Dr. Pocket, but I ran into something funky.

On my Dell Axim, when Button A is pressed, it calls the ButtonDown function twice (using PocketFrog). The first call sends a button value of 91, and the second sends a button value of 193 (which is the unique value). That same 91 is also sent for buttons B, C and Start, in addition to their unique values (194, 195, 196).

And the same behavior exists for the D-Pad. Except instead of sending a button value of 91, it sends 132 in addition to the unique values (37, 38, 39, 40).

So, does anyone else see this behavior? If you didn't understand what I said, ButtonDown is always being called twice with the following values:
Button A - 91 and 193
Button B - 91 and 194
Button C - 91 and 195
Button Start - 91 and 196
D-Pad Left - 132 and 37
D-Pad Up - 132 and 38
D-Pad Right - 132 and 39
D-Pad Down - 132 and 40

I'm curious if this is unique to the Axim, or is it standard across PPCs.

Thanks,
-John
<a href="http://www.pocketadventures.com/travel.asp"><img src="http://www.pocketadventures.com/images/ttc_banner.gif" border="0"></a>
User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby Digby » Apr 28, 2003 @ 11:17pm

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby efortier » Oct 6, 2003 @ 7:39pm

Hi Presto,

I was wondering if you found a solution or an explanation for the double key you get on the PocketPC.

My device is an iPaq 3850 and I'm getting the same thing as you noted in your message back in april, except for the start button which returns 134 followed by 13.

I have taken care of code 132 in my keydown handler, but I don't feel very good about this. Especially since I will have a way for people to remap the keys themselves.

Thanks for any info.

--Eric
Last edited by efortier on Oct 6, 2003 @ 7:43pm, edited 1 time in total.
User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby warmi » Oct 6, 2003 @ 7:41pm

warmi
pm Insider
 
Posts: 518
Joined: Aug 24, 2002 @ 8:07am
Location: Chicago USA


Postby efortier » Oct 6, 2003 @ 7:46pm

User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby Presto » Oct 6, 2003 @ 7:56pm

User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby mlepage » Oct 6, 2003 @ 8:03pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby efortier » Oct 6, 2003 @ 8:11pm

User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby mlepage » Oct 6, 2003 @ 8:36pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby Presto » Oct 6, 2003 @ 9:22pm

User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby mlepage » Oct 6, 2003 @ 10:13pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby dan.p » Feb 17, 2005 @ 6:29pm

dan.p
pm Member
 
Posts: 89
Joined: Jan 6, 2005 @ 6:49am


Postby dan.p » Feb 19, 2005 @ 5:16am

Okay, after a large amount of research I've come across this (special thanks to StephC):

http://www.cewindows.net/developer/pocketpcbuttons.htm

I believe the shadow keys can be filtered out give this information. On each keydown or keyup, test for 0xc1 through 0xc6, and of course the four directions on the d-pad. If the keycode is none of those, simply ignore it. This should solve shadow key issues with all devices.

Also, you'll notice just about every device defaults to 0xc1 through 0xc4 for the 4 buttons (left to right). This should give a good setup for default keys that will please most users out there.
dan.p
pm Member
 
Posts: 89
Joined: Jan 6, 2005 @ 6:49am


Postby efortier » Jul 11, 2005 @ 12:46am

User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron