Guest jwicks Posted October 12, 2004 Report Posted October 12, 2004 Hi, I am using GAPI's GxOpenInput() call to grab all of the key events. Unfortunately, I want to consume all key events, except the ones for the end and power key. I want those two keys to have the default shell behavior. Is there a way to 'repost' these to the shell, or to some how get them to perform their default behavior even when using GAPI? Thanks, Jon
Guest muff Posted October 12, 2004 Report Posted October 12, 2004 by the End key I'm guessing you mean the 'back' button or the 'end call' button if you want that to quit the app, then just code it to do so same goes for the power button really on the C500 be aware that GAPI does not trap the camera button or the home key being held down
Guest jwicks Posted October 12, 2004 Report Posted October 12, 2004 Right, by the 'end' key I mean the 'end call' key. I know that I could just call SetForegroundWindow() with these keys but their behavior when processed by the shell is different: 1. The end key a. When in a call - ends the phone call and does not background the window. b. When not in a call - backgrounds the window. 2. The power key a. When pressed and released quickly - brings up the 'quick app' screen. b. When pressed and held - shuts the phone off. I want to be able perform these same actions. I suppose there are two routes, one would be if I could somehow have the shell handle them, the other would be to try and simulate all of this myself. Either way I am not sure how to accomplish all of these actions (ending a call, bringing up quick app list, shutting off phone).
Guest muff Posted October 12, 2004 Report Posted October 12, 2004 you can 'minimise' the app and restore it when you want to, and tell gapi to stop updating or start again GXResume(); GXSuspend(); at the end of the day if you are trying to simulate these things you need to decide if it's more important for you to write simulating code, or else minimise or even close the gapi program on certain keypresses
Guest jwicks Posted October 12, 2004 Report Posted October 12, 2004 I've seen that Interstellar Flames is correctly handling these keys even though they use GAPI. So I know it's possible. I was just wondering if anyone knew how they accomplished it.
Guest muff Posted October 12, 2004 Report Posted October 12, 2004 maybe they aren't using GXInput() ?
Guest jwicks Posted October 12, 2004 Report Posted October 12, 2004 They must be using GxOpenInput() since the have overridden the default behavior of the back key, and have prevented the MS applications like the "Record" app from popping up. Is there any other way to achieve this without using GxOpenInput?
Guest muff Posted October 12, 2004 Report Posted October 12, 2004 not that I'm aware of, but then I always want to handle all the keys myself during my games ^_^
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now