blob: 14ccf288c3d2117ca2461132bad314a3bd222454 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{$MACRO ON}
(******************************************************************************
*
* Copyright (c) 1994-2000 Palm, Inc. or its subsidiaries.
* All rights reserved.
*
* File: KeyMgr.h
*
* Release: Palm OS SDK 4.0 (63220)
*
* Description:
* Include file for Key manager
*
* History:
* 9/13/95 Created by Ron Marianetti
* 2/04/98 srj- added contrast key defines
* 8/23/98 SCL- Cross-merged 3.1 and 3.2
*
*****************************************************************************)
unit keymgr;
interface
uses palmos, coretraps;
(********************************************************************
* Definition of bit field returned from KeyCurrentState
********************************************************************)
const
keyBitPower = $0001; // Power key
keyBitPageUp = $0002; // Page-up
keyBitPageDown = $0004; // Page-down
keyBitHard1 = $0008; // App #1
keyBitHard2 = $0010; // App #2
keyBitHard3 = $0020; // App #3
keyBitHard4 = $0040; // App #4
keyBitCradle = $0080; // Button on cradle
keyBitAntenna = $0100; // Antenna "key" <chg 3-31-98 RM>
keyBitContrast = $0200; // Contrast key
keyBitsAll = $FFFFFFFF; // all keys
slowestKeyDelayRate = $ff;
slowestKeyPeriodRate = $ff;
(********************************************************************
* Key manager Routines
********************************************************************)
// Set/Get the auto-key repeat rate
function KeyRates(set_: Boolean; var initDelayP, periodP, doubleTapDelayP: UInt16;
var queueAheadP: Boolean): Err; syscall sysTrapKeyRates;
// Get the current state of the hardware keys
// This is now updated every tick, even when more than 1 key is held down.
function KeyCurrentState: UInt32; syscall sysTrapKeyCurrentState;
// Set the state of the hardware key mask which controls if the key
// generates a keyDownEvent
function KeySetMask(keyMask: UInt32): UInt32; syscall sysTrapKeySetMask;
implementation
end.
|