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 Key Manager" of the Palm OS Programmer's Companion, vol. I.
Key Manager Functions
KeyCurrentState Function
Purpose
Return bit field with bits set for each key that is currently depressed.
Declared In
KeyMgr.h
Prototype
UInt32 KeyCurrentState ( void )
Parameters
Returns
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 Function
Purpose
Get or set the key repeat rates.
Declared In
KeyMgr.h
Prototype
Err KeyRates ( Boolean set, UInt16 *initDelayP, UInt16 *periodP, UInt16 *doubleTapDelayP, Boolean *queueAheadP )
Parameters
-
set
- If
true
, settings are changed; iffalse
, 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. Iffalse
, auto-repeat doesn't enqueue keys unless the queue is already empty.
Returns
See Also
KeySetMask Function
Purpose
Specify which keys generate keyDownEvents
.
You can specify this either by using this function or by using the poweredOnKeyMask
modifier.
Declared In
KeyMgr.h
Prototype
UInt32 KeySetMask ( UInt32 keyMask )
Parameters
Returns
Compatibility
Implemented only if 2.0 New Feature Set is present.