Coincidently I just figured this out for myself yesterday... You need to be a registered PalmSource developer if you are not already.
Go to the "Development Seeding Area" page of the PalmSource Resource Pavilion and download FiveWaySDK.zip. This includes a macro which automatically detects the short "key up" event, and the enclosed documentation has the "official" recepie for detecting the "long" press of the navigator button. Then you need to register as a developer with the PalmOne Plugged In web site. From there you can download simulators for all the newer Palm models which support the 5-way navigator. They just put up a Tungsten T-3 simulator. I've not seen the real HW yet, but it looks way cool from the simulator:-) Hope that helps... Dave "Edmund" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi all, > > I'd like to detect the long press of the 5-Way Natvigator Button (if any). I > found that KeyCurrentState() can return the states of the hardware buttons, > but there is not definition for the bit field of any of the 5-way natvigator > buttons. (Please see the "KeyMgr.h" qouted below). Thus: > > 1). does KeyCurrentState() return the state of the 5-Way Natvigator Button? > > 2). How can I simulate pressing the 5-Way nativgator button in the > simulator? I can't find anything about it in the doc. > > Please anyone give me some hints! Thanks!!! > > > --------- Quote: KeyMgr.h -------------------------- > /*************************************************************************** > *** > * > * Copyright (c) 1994-2003 PalmSource, Inc. All rights reserved. > * > * File: KeyMgr.h > * > * Release: Palm OS 5 SDK (68K) R3. > * > * Description: > * Include file for Key manager > * > > **************************************************************************** > */ > > #ifndef __KEYMGR_H__ > #define __KEYMGR_H__ > > // Pilot common definitions > #include <PalmTypes.h> > #include <CoreTraps.h> > > > /******************************************************************** > * Definition of bit field returned from KeyCurrentState > ********************************************************************/ > #define keyBitPower 0x0001 // Power key > #define keyBitPageUp 0x0002 // Page-up > #define keyBitPageDown 0x0004 // Page-down > #define keyBitHard1 0x0008 // App #1 > #define keyBitHard2 0x0010 // App #2 > #define keyBitHard3 0x0020 // App #3 > #define keyBitHard4 0x0040 // App #4 > #define keyBitCradle 0x0080 // Button on cradle > #define keyBitAntenna 0x0100 // Antenna "key" <chg 3-31-98 RM> > #define keyBitContrast 0x0200 // Contrast key > > #define keyBitsAll 0xFFFFFFFF // all keys > > > #define slowestKeyDelayRate 0xff > #define slowestKeyPeriodRate 0xff > > > /******************************************************************** > * Key manager Routines > ********************************************************************/ > #ifdef __cplusplus > extern "C" { > #endif > > // Set/Get the auto-key repeat rate > Err KeyRates(Boolean set, UInt16 *initDelayP, UInt16 *periodP, > UInt16 *doubleTapDelayP, Boolean *queueAheadP) > SYS_TRAP(sysTrapKeyRates); > > // Get the current state of the hardware keys > // This is now updated every tick, even when more than 1 key is held down. > UInt32 KeyCurrentState(void) > SYS_TRAP(sysTrapKeyCurrentState); > > // Set the state of the hardware key mask which controls if the key > // generates a keyDownEvent > UInt32 KeySetMask(UInt32 keyMask) > SYS_TRAP(sysTrapKeySetMask); > > #ifdef __cplusplus > } > #endif > > > #endif //__KEYMGR_H__ > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
