This chapter provides reference material for the key manager. The key manager API is declared in the header file KeyMgr.h.
For more information on the key manager, see the section "Receiving User Input" in the Palm OS Programmer's Companion, vol. I.
Key Manager Functions

KeyCurrentState

Purpose
Return bit field with bits set for each key that is currently depressed.
Prototype
UInt32 KeyCurrentState (void)
Parameters
None.
Result
Returns a UInt32 with bits set for keys that are depressed. See keyBitPower, keyBitPageUp, keyBitPageDown, etc., in KeyMgr.h.
Comments
Called by applications that need to poll the keys.
See Also
KeyRates
KeyRates

Purpose
Get or set the key repeat rates.
Prototype
Err KeyRates (Boolean set, UInt16* initDelayP, UInt16* periodP, UInt16* doubleTapDelayP, Boolean* queueAheadP)
Parameters
set | If true, settings are changed; if false, current settings are returned. |
initDelayP | Initial delay in ticks for a auto-repeat event. |
periodP | Auto-repeat rate specified as period in ticks. |
doubleTapDelayP | Maximum double-tap delay, in ticks. |
queueAheadP | If true, auto-repeating keeps queueing up key events if the queue has keys in it. If false, auto-repeat doesn't enqueue keys unless the queue is already empty. |
Result
Returns 0 if no error.
See Also
KeyCurrentState
KeySetMask

Purpose
Specify which keys generate keyDownEvents.
You can specify this either by using this function or by using the poweredOnKeyMask modifier.
Prototype
UInt32 KeySetMask (UInt32 keyMask)
Parameters
keyMask | Mask with bits set for those keys to generate keyDownEvents for. |
Result
Returns the old key Mask.
Compatibility
Implemented only if 2.0 New Feature Set is present.
|