Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

40    Key Manager

Palm OS® Programmer's API Reference

Palm OS® 68K SDK

     

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 ^TOP^

KeyCurrentState Function ^TOP^

Purpose

Return bit field with bits set for each key that is currently depressed.

Declared In

KeyMgr.h

Prototype

UInt32 KeyCurrentState (
   void
)

Parameters

None.

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()

KeyRates Function ^TOP^

Purpose

Get or set the key repeat rates.

Declared In

KeyMgr.h

Prototype

Err KeyRates (
   Booleanset,
   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.

Returns

Returns 0 if no error.

See Also

KeyCurrentState()

KeySetMask Function ^TOP^

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

keyMask
Mask with bits set for those keys to generate keyDownEvents for.

Returns

Returns the old key Mask.

Compatibility

Implemented only if 2.0 New Feature Set is present.