Pre OS5 you have to set a trap. On >=OS5, you have to register for sysNotifyEventDequeuedEvent. On that one, make sure to watch for byte swapping on the events coming in.
Hope that helps! -Jon ------------------------------------------- Jonathan Hays Palm OS Certified Developer http://hazelware.luggle.com ------------------------------------------- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Randy Pulsifer Sent: Saturday, December 04, 2004 12:12 PM To: Palm Developer Forum Subject: RE: Detecting Hardware Button presses when app doesnt run Nope, not from your program anyways! The simplest method, though quite unacceptable for a shrink-wrapped app, would be to force the user to remap one of the hardware buttons to your app. The other method in OS4 and lower is to use Hackmaster and write a hack that usurps the button. In either case, PalmOS does not provide any return values to let you return to what the user was doing, assuming that you can get your library call made, no pushing entry points down on the stack or anything like that. Hacking that into the OS would be a major undertaking - actually simpler just to write your own launcher app that kept track of such things. But again, this is really burdensome to the user, unless this is a dedicated application and not intended for the masses. This is not to say that someone hasn't come up ways to do this since then, but I was in a similar boat a year or so ago and asked similar questions and the answer was, in essence, PalmOS runs one app at a time and if you can figure out a way to interrupt and run your stuff, you can't get back. I hope someone will chime in with the magic bullet for you, I'll be watching this thread myself for that Occurance. Regards, Randyp <<<<<<<<<< There are 10 types of people >>>>>>>>>>> <<<<<<<<<< Those who understand binary, >>>>>>>>>>> <<<<<<<<<< And those that don't. >>>>>>>>>>> > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:bounce-378273- > [EMAIL PROTECTED] On Behalf Of Tam Hanna > Sent: Saturday, December 04, 2004 1:02 PM > To: Palm Developer Forum > Subject: Detecting Hardware Button presses when app doesnt run > > Hi, > I have already researched a bit about this problem, but couldn't find > any > answer: > I am currently writing a program that must react to hard-key button > presses. > The reaction is simple-its just a call to a library function! However, > the > program must react regardless the active program. So, if it runs, it > must > react. If it doesn't, it must react too! > Does anyone of you know a solution that works on OS4 as found on a m505? > Best Regards > Tam Hanna > > -- > NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl > GMX DSL-Netzanschluss + Tarif zum superg�nstigen Komplett-Preis! > > -- > For information on using the Palm Developer Forums, or to unsubscribe, > please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
