keyd.inc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. { setup }
  2. Function ptc_key_create(code : Integer; alt, shift, control : Boolean) : TPTC_KEY;
  3. Procedure ptc_key_destroy(obj : TPTC_KEY);
  4. { key code }
  5. Function ptc_key_code(obj : TPTC_KEY) : Integer;
  6. { modifiers }
  7. Function ptc_key_alt(obj : TPTC_KEY) : Boolean;
  8. Function ptc_key_shift(obj : TPTC_KEY) : Boolean;
  9. Function ptc_key_control(obj : TPTC_KEY) : Boolean;
  10. { operators }
  11. Procedure ptc_key_assign(obj : TPTC_KEY; key : TPTC_KEY);
  12. Function ptc_key_equals(obj : TPTC_KEY; key : TPTC_KEY) : Boolean;
  13. { key codes }
  14. {#define PTC_KEY_ENTER '\n'
  15. #define PTC_KEY_BACKSPACE '\b'
  16. #define PTC_KEY_TAB '\t'
  17. #define PTC_KEY_CANCEL 0x03
  18. #define PTC_KEY_CLEAR 0x0C
  19. #define PTC_KEY_SHIFT 0x10
  20. #define PTC_KEY_CONTROL 0x11
  21. #define PTC_KEY_ALT 0x12
  22. #define PTC_KEY_PAUSE 0x13
  23. #define PTC_KEY_CAPSLOCK 0x14
  24. #define PTC_KEY_ESCAPE 0x1B
  25. #define PTC_KEY_SPACE 0x20
  26. #define PTC_KEY_PAGEUP 0x21
  27. #define PTC_KEY_PAGEDOWN 0x22
  28. #define PTC_KEY_END 0x23
  29. #define PTC_KEY_HOME 0x24
  30. #define PTC_KEY_LEFT 0x25
  31. #define PTC_KEY_UP 0x26
  32. #define PTC_KEY_RIGHT 0x27
  33. #define PTC_KEY_DOWN 0x28
  34. #define PTC_KEY_COMMA 0x2C
  35. #define PTC_KEY_PERIOD 0x2E
  36. #define PTC_KEY_SLASH 0x2F
  37. #define PTC_KEY_ZERO 0x30
  38. #define PTC_KEY_ONE 0x31
  39. #define PTC_KEY_TWO 0x32
  40. #define PTC_KEY_THREE 0x33
  41. #define PTC_KEY_FOUR 0x34
  42. #define PTC_KEY_FIVE 0x35
  43. #define PTC_KEY_SIX 0x36
  44. #define PTC_KEY_SEVEN 0x37
  45. #define PTC_KEY_EIGHT 0x38
  46. #define PTC_KEY_NINE 0x39
  47. #define PTC_KEY_SEMICOLON 0x3B
  48. #define PTC_KEY_EQUALS 0x3D
  49. #define PTC_KEY_A 0x41
  50. #define PTC_KEY_B 0x42
  51. #define PTC_KEY_C 0x43
  52. #define PTC_KEY_D 0x44
  53. #define PTC_KEY_E 0x45
  54. #define PTC_KEY_F 0x46
  55. #define PTC_KEY_G 0x47
  56. #define PTC_KEY_H 0x48
  57. #define PTC_KEY_I 0x49
  58. #define PTC_KEY_J 0x4A
  59. #define PTC_KEY_K 0x4B
  60. #define PTC_KEY_L 0x4C
  61. #define PTC_KEY_M 0x4D
  62. #define PTC_KEY_N 0x4E
  63. #define PTC_KEY_O 0x4F
  64. #define PTC_KEY_P 0x50
  65. #define PTC_KEY_Q 0x51
  66. #define PTC_KEY_R 0x52
  67. #define PTC_KEY_S 0x53
  68. #define PTC_KEY_T 0x54
  69. #define PTC_KEY_U 0x55
  70. #define PTC_KEY_V 0x56
  71. #define PTC_KEY_W 0x57
  72. #define PTC_KEY_X 0x58
  73. #define PTC_KEY_Y 0x59
  74. #define PTC_KEY_Z 0x5A
  75. #define PTC_KEY_OPENBRACKET 0x5B
  76. #define PTC_KEY_BACKSLASH 0x5C
  77. #define PTC_KEY_CLOSEBRACKET 0x5D
  78. #define PTC_KEY_NUMPAD0 0x60
  79. #define PTC_KEY_NUMPAD1 0x61
  80. #define PTC_KEY_NUMPAD2 0x62
  81. #define PTC_KEY_NUMPAD3 0x63
  82. #define PTC_KEY_NUMPAD4 0x64
  83. #define PTC_KEY_NUMPAD5 0x65
  84. #define PTC_KEY_NUMPAD6 0x66
  85. #define PTC_KEY_NUMPAD7 0x67
  86. #define PTC_KEY_NUMPAD8 0x68
  87. #define PTC_KEY_NUMPAD9 0x69
  88. #define PTC_KEY_MULTIPLY 0x6A
  89. #define PTC_KEY_ADD 0x6B
  90. #define PTC_KEY_SEPARATOR 0x6C
  91. #define PTC_KEY_SUBTRACT 0x6D
  92. #define PTC_KEY_DECIMAL 0x6E
  93. #define PTC_KEY_DIVIDE 0x6F
  94. #define PTC_KEY_F1 0x70
  95. #define PTC_KEY_F2 0x71
  96. #define PTC_KEY_F3 0x72
  97. #define PTC_KEY_F4 0x73
  98. #define PTC_KEY_F5 0x74
  99. #define PTC_KEY_F6 0x75
  100. #define PTC_KEY_F7 0x76
  101. #define PTC_KEY_F8 0x77
  102. #define PTC_KEY_F9 0x78
  103. #define PTC_KEY_F10 0x79
  104. #define PTC_KEY_F11 0x7A
  105. #define PTC_KEY_F12 0x7B
  106. #define PTC_KEY_DELETE 0x7F
  107. #define PTC_KEY_NUMLOCK 0x90
  108. #define PTC_KEY_SCROLLLOCK 0x91
  109. #define PTC_KEY_PRINTSCREEN 0x9A
  110. #define PTC_KEY_INSERT 0x9B
  111. #define PTC_KEY_HELP 0x9C
  112. #define PTC_KEY_META 0x9D
  113. #define PTC_KEY_BACKQUOTE 0xC0
  114. #define PTC_KEY_QUOTE 0xDE
  115. #define PTC_KEY_FINAL 0x18
  116. #define PTC_KEY_CONVERT 0x1C
  117. #define PTC_KEY_NONCONVERT 0x1D
  118. #define PTC_KEY_ACCEPT 0x1E
  119. #define PTC_KEY_MODECHANGE 0x1F
  120. #define PTC_KEY_KANA 0x15
  121. #define PTC_KEY_KANJI 0x19
  122. #define PTC_KEY_UNDEFINED 0x0}