Key Manager
 

 < Home   < Developers   < Development Support   < Documentation

37 Key Manager


 Table of Contents  |  < Previous  |  Next >  |  Index
   
   

Title -
Palm OS® Programmer's API Reference

Part II: System Management

37 Key Manager

Key Manager Functions

KeyCurrentState

KeyRates

KeySetMask

       

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

setIf true, settings are changed; if false, current settings are returned.
initDelayPInitial delay in ticks for a auto-repeat event.
periodPAuto-repeat rate specified as period in ticks.
doubleTapDelayPMaximum double-tap delay, in ticks.
queueAheadPIf 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

keyMaskMask 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.