keymgr.pp 2.1 KB

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