home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / CKPM5X_S.ZIP / CKOKEY.H < prev    next >
Text File  |  1990-04-13  |  3KB  |  97 lines

  1. /******************************************************************************
  2. Header name: ckokey.h     Rev: 01  Date: 07-Dec-89 Programmer: C.P.Armstrong
  3.  
  4. Header title:   Definitions of key press combinations not provided for by the
  5.                 Presentation Manager.
  6.  
  7. Description:    Alt- key combinations do not produce unique key codes under the
  8.                 PM.  The keypad keys with NumLock off do not produce
  9.                 unique codes as defined under the PM.  Ctrl- and
  10.                 shift- function keys do not produce unique key codes
  11.                 as defined under the PM.  Alt- function key commands
  12.                 are intercepted by the PM and not provided as WM_CHAR
  13.                 messages.
  14.                 
  15.                 So I've invented by own key codes.
  16.                 If the Alt- key is pressed then bit 8 is set in the
  17.                 keys normal scan code.  If the Ctrl- key is pressed
  18.                 for a function key or direction key then bit 7 is set
  19.                 in the scan code. 
  20.                 
  21.                 To distiguish between the Numeric keypad direction codes and
  22.                 the grey direction keys the scan codes for the keypad keys must
  23.                 be filtered before testing for a valid virtual key code.  To
  24.                 allow the numeric characters generated by the keypad with
  25.                 NumLock on to pass a valid char code must be checked for first.
  26.                 
  27.  
  28. Modification History:
  29.     01  07-Dec-89   C.P.Armstrong   created
  30.  
  31. ******************************************************************************/
  32. #define KPSLASH     0x5C
  33. #define KPSTAR      0x37
  34.  
  35. #define KP7         0x47
  36. #define KP8         0x48
  37. #define KP9         0x49
  38. #define KPMINUS     0x4A
  39. #define KP4         0x4B
  40. #define KP5         0x4C
  41. #define KP6         0x4D
  42. #define KPPLUS      0x4E
  43. #define KP1         0x4F
  44. #define KP2         0x50
  45. #define KP3         0x51
  46. #define KP0         0x52
  47. #define KPDOT       0x53
  48.  
  49. #define ALT_1       0x82
  50. #define ALT_2       0x83
  51. #define ALT_3       0x84
  52. #define ALT_4       0x85
  53. #define ALT_5       0x86
  54. #define ALT_6       0x87
  55. #define ALT_7       0x88
  56. #define ALT_8       0x89
  57. #define ALT_9       0x8A
  58. #define ALT_0       0x8B
  59. #define ALT_MINUS   0x8C
  60. #define ALT_EQUAL   0x8D
  61. #define ALT_Q       0x90
  62. #define ALT_W       0x91
  63. #define ALT_E       0x92
  64. #define ALT_R       0x93
  65. #define ALT_T       0x94
  66. #define ALT_Y       0x95
  67. #define ALT_U       0x96
  68. #define ALT_I       0x97
  69. #define ALT_O       0x98
  70. #define ALT_P       0x99
  71. #define ALT_LSQ     0x9A
  72. #define ALT_RSQ     0x9B
  73. #define ALT_A       0x9E
  74. #define ALT_S       0x9F
  75. #define ALT_D       0xA0
  76. #define ALT_F       0xA1
  77. #define ALT_G       0xA2
  78. #define ALT_H       0xA3
  79. #define ALT_J       0xA4
  80. #define ALT_K       0xA5
  81. #define ALT_L       0xA6
  82. #define ALT_SEMICOLON 0xA27
  83. #define ALT_QUOTE   0xA8
  84. #define ALT_Z       0xAC
  85. #define ALT_X       0xAD
  86. #define ALT_C       0xAE
  87. #define ALT_V       0xAF
  88. #define ALT_B       0xB0
  89. #define ALT_N       0xB1
  90. #define ALT_M       0xB2
  91. #define ALT_COMMA   0xB3
  92. #define ALT_PERIOD  0xB4
  93. #define ALT_SLASH   0xB5
  94. #define ALT_BSLASH  0xAB
  95.  
  96. #define VK_SHPRINTSCRN (VK_PRINTSCRN | 0x20)
  97.