home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / cdity / yak / src / keydef_window.h < prev    next >
C/C++ Source or Header  |  1994-06-09  |  3KB  |  168 lines

  1.  
  2. #ifndef EXEC_TYPES_H
  3. #include <exec/types.h>
  4. #endif
  5.  
  6. #ifndef DEVICES_INPUTEVENT_H
  7. #include <devices/inputevent.h>
  8. #endif
  9.  
  10.  
  11.  
  12.  
  13. /*
  14.  * YakKeyDef structure definition
  15.  */
  16. typedef struct {
  17.     LONG  ykd_Class;
  18.     UWORD ykd_Qual;
  19.     UWORD ykd_IQual;
  20.     UWORD ykd_SQual;
  21.     LONG  ykd_Stroke;
  22.     UWORD ykd_Code;
  23. } YakKeyDef;
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. #define HKCLASS_RAWKEY       0
  31. #define HKCLASS_RAWMOUSE     1
  32. #define HKCLASS_DISKINSERTED 2
  33. #define HKCLASS_DISKREMOVED  3
  34.  
  35. static const STRPTR ClassArray[] =
  36. {
  37.     "RawKey",
  38.     "RawMouse",
  39.     "DiskInserted",
  40.     "DiskRemoved",
  41. };
  42.  
  43.  
  44. #define HKSTROKE_DOWN    0
  45. #define HKSTROKE_UP      1
  46. #define HKSTROKE_DOWN_UP 2
  47.  
  48. static const STRPTR StrokeArray[] =
  49. {
  50.     "",
  51.     " upstroke",
  52.     " -upstroke"
  53. };
  54.  
  55.  
  56.  
  57.  
  58. #define IEQUALIFIER_MOUSEBUTTONS (IEQUALIFIER_MIDBUTTON|IEQUALIFIER_RBUTTON|IEQUALIFIER_LEFTBUTTON)
  59. #define IEQUALIFIER_KEYS         (IEQUALIFIER_NUMERICPAD|IEQUALIFIER_REPEAT)
  60. #define NO_IEQUALIFIER 0x0000
  61.  
  62.  
  63. struct QualifierArrayType
  64. {
  65.     UWORD  qat_ID;
  66.     STRPTR qat_Str;
  67. };
  68.  
  69.  
  70. #define QUALIFIERS_NUMBER 13
  71. static const struct QualifierArrayType QualifierArray[] =
  72. {
  73.     {IEQUALIFIER_CONTROL,       "Control"},
  74.     {IEQUALIFIER_LSHIFT,        "LShift"},
  75.     {IEQUALIFIER_RSHIFT,        "RShift"},
  76.     {IEQUALIFIER_CAPSLOCK,      "CapsLock"},
  77.     {IEQUALIFIER_LALT,          "LAlt"},
  78.     {IEQUALIFIER_RALT,          "RAlt"},
  79.     {IEQUALIFIER_LCOMMAND,      "LCommand"},
  80.     {IEQUALIFIER_RCOMMAND,      "RCommand"},
  81.     {IEQUALIFIER_LEFTBUTTON,    "LeftButton"},
  82.     {IEQUALIFIER_MIDBUTTON,     "MidButton"},
  83.     {IEQUALIFIER_RBUTTON,       "RButton"},
  84.     {IEQUALIFIER_REPEAT,        "Repeat"},
  85.     {IEQUALIFIER_NUMERICPAD,    "NumericPad"}
  86. };
  87.  
  88.  
  89. #define SAMEQUALIFIERS_NUMBER 3
  90. static const struct QualifierArrayType SameQualifierArray[] =
  91. {
  92.     {IXSYM_SHIFTMASK, "Shift"},
  93.     {IXSYM_CAPSMASK,  "Caps"},
  94.     {IXSYM_ALTMASK,   "Alt"}
  95. };
  96.  
  97.  
  98.  
  99.  
  100.  
  101. struct QualifierPadArrayType
  102. {
  103.     UWORD qpat_Code;
  104.     UWORD qpat_Qualifier;
  105. };
  106.  
  107. #define QUALIFIERSPAD_NUMBER 9
  108. static const struct QualifierPadArrayType QualifierPadArray[] =
  109. {
  110.     {0x60, IEQUALIFIER_LSHIFT},
  111.     {0x61, IEQUALIFIER_RSHIFT},
  112.     {0x62, IEQUALIFIER_CAPSLOCK},      /* CapsLock down */
  113.     {0xe2, IEQUALIFIER_CAPSLOCK},      /* CapsLock up */
  114.     {0x63, IEQUALIFIER_CONTROL},
  115.     {0x64, IEQUALIFIER_LALT},
  116.     {0x65, IEQUALIFIER_RALT},
  117.     {0x66, IEQUALIFIER_LCOMMAND},
  118.     {0x67, IEQUALIFIER_RCOMMAND}
  119. };
  120.  
  121.  
  122.  
  123.  
  124. #define NO_IECODE      0xFFFF
  125.  
  126.  
  127. struct CodeArrayType
  128. {
  129.     UWORD  cat_Code;
  130.     STRPTR cat_Str;
  131. };
  132.  
  133. #define CODES_NUMBER 31
  134. static const struct CodeArrayType CodeArray[] =
  135. {
  136.     {0x38,      "Comma"},
  137.     {0x40,      "Space"},
  138.     {0x41,      "BackSpace"},
  139.     {0x42,      "Tab"},
  140.     {0x43,      "Enter"},
  141.     {0x44,      "Return"},
  142.     {0x45,      "Esc"},
  143.     {0x46,      "Del"},
  144.     {0x47,      "Insert"},
  145.     {0x48,      "Page_Up"},
  146.     {0x49,      "Page_Down"},
  147.     {0x4C,      "Up"},
  148.     {0x4D,      "Down"},
  149.     {0x4E,      "Right"},
  150.     {0x4F,      "Left"},
  151.     {0x50,      "F1"},
  152.     {0x51,      "F2"},
  153.     {0x52,      "F3"},
  154.     {0x53,      "F4"},
  155.     {0x54,      "F5"},
  156.     {0x55,      "F6"},
  157.     {0x56,      "F7"},
  158.     {0x57,      "F8"},
  159.     {0x58,      "F9"},
  160.     {0x59,      "F10"},
  161.     {0x5F,      "Help"},
  162.     {0x68,      "Mouse_LeftPress"},
  163.     {0x69,      "Mouse_RightPress"},
  164.     {0x6A,      "Mouse_MiddlePress"},
  165.     {0x70,      "Home"},
  166.     {0x71,      "End"}
  167. };
  168.