PocketMatrix forums

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

Question about smartphone keys

angedelamort · 13 Jun 2002, 13:21 UTC
I don't know if it's the right place, but I had not found any other good forum for asking this question.

I'm trying to make a game with GAPI, and the problem is really simple. How can I catch "all" the keys? To be more specific: The ?"#!&* back key. I know my good friend Microsoft wanted to make this button generic for all apps, but when my game run, I don't want my apps to be switched. For now, I'm closing my apps when I loose focus :(

In the doc, they say that we should override the VK_TBACK message as a hotkey... the problem is : there is no VK_TBACK constant in my SDK. I've just ordered the new release... I hope this problem will be fixed.

TIA.

P.S. If you know a good smartphone forum, I would be really interested in it :P
Hey,

I think you have came to the right place. I'm not sure how many people on this forum are developing for smartphones, but I do know that at least Dan East mentioned them before.

FYI: Overloaded also has a forum here (I happen to moderate it :) ), and we just ordered two Z100's from Sendo. We'll add support for smartphones to our library very soon.

- Jacco.
The PPC2002 SDK has, in tpcuser.h:

#define VK_TBACK VK_ESCAPE

and in winuser.h:

#define VK_ESCAPE 0x1B

Cheers,

Refractor
We plan porting almost all our games and apps to Smartphone, we also ordered the Z100 last week from sendo. Jacco, have you received a shipment notice yet? They got the money from us las tweek and still nothing.

cryo
angedelamort · 13 Jun 2002, 19:48 UTC
Thanks a lot for these answers. I'll try that right after some cool debugging :P

But for my part, with visual embbedded, it's not really convenient to develop right now... We have to batch the exe to sign it to be able to execute the file and more, we have to upload it manually... And playing on that device is not easy. If it had a touch screen like ppc, it would be really nice.
angedelamort · 14 Jun 2002, 21:30 UTC
To give you some feedback. It works at last :)

here for those who are interested:
Code:

#ifndef VK_TBACK
#define VK_TBACK 0x1B
#endif

//when you init the keys, call that:
//the 0x3 came from those define
//#define SHCMBF_NODEFAULT 0x00000001 // do not do default handling of this key
//#define SHCMBF_NOTIFY 0x00000002 // send us the WM_* messages for this key
//0x3 = SHCMBF_NODEFAULT | SHCMBF_NOTIFY; // :)
(void)SendMessage( gWindow,
SHCMBM_OVERRIDEKEY,
VK_TBACK,
MAKELPARAM(0x3, 0x3));

//after that you handle it like any other key.


Hope it will help any other smart phone developpers :)