home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
util
/
cdity
/
yak
/
src
/
keydef_window.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-09
|
3KB
|
168 lines
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef DEVICES_INPUTEVENT_H
#include <devices/inputevent.h>
#endif
/*
* YakKeyDef structure definition
*/
typedef struct {
LONG ykd_Class;
UWORD ykd_Qual;
UWORD ykd_IQual;
UWORD ykd_SQual;
LONG ykd_Stroke;
UWORD ykd_Code;
} YakKeyDef;
#define HKCLASS_RAWKEY 0
#define HKCLASS_RAWMOUSE 1
#define HKCLASS_DISKINSERTED 2
#define HKCLASS_DISKREMOVED 3
static const STRPTR ClassArray[] =
{
"RawKey",
"RawMouse",
"DiskInserted",
"DiskRemoved",
};
#define HKSTROKE_DOWN 0
#define HKSTROKE_UP 1
#define HKSTROKE_DOWN_UP 2
static const STRPTR StrokeArray[] =
{
"",
" upstroke",
" -upstroke"
};
#define IEQUALIFIER_MOUSEBUTTONS (IEQUALIFIER_MIDBUTTON|IEQUALIFIER_RBUTTON|IEQUALIFIER_LEFTBUTTON)
#define IEQUALIFIER_KEYS (IEQUALIFIER_NUMERICPAD|IEQUALIFIER_REPEAT)
#define NO_IEQUALIFIER 0x0000
struct QualifierArrayType
{
UWORD qat_ID;
STRPTR qat_Str;
};
#define QUALIFIERS_NUMBER 13
static const struct QualifierArrayType QualifierArray[] =
{
{IEQUALIFIER_CONTROL, "Control"},
{IEQUALIFIER_LSHIFT, "LShift"},
{IEQUALIFIER_RSHIFT, "RShift"},
{IEQUALIFIER_CAPSLOCK, "CapsLock"},
{IEQUALIFIER_LALT, "LAlt"},
{IEQUALIFIER_RALT, "RAlt"},
{IEQUALIFIER_LCOMMAND, "LCommand"},
{IEQUALIFIER_RCOMMAND, "RCommand"},
{IEQUALIFIER_LEFTBUTTON, "LeftButton"},
{IEQUALIFIER_MIDBUTTON, "MidButton"},
{IEQUALIFIER_RBUTTON, "RButton"},
{IEQUALIFIER_REPEAT, "Repeat"},
{IEQUALIFIER_NUMERICPAD, "NumericPad"}
};
#define SAMEQUALIFIERS_NUMBER 3
static const struct QualifierArrayType SameQualifierArray[] =
{
{IXSYM_SHIFTMASK, "Shift"},
{IXSYM_CAPSMASK, "Caps"},
{IXSYM_ALTMASK, "Alt"}
};
struct QualifierPadArrayType
{
UWORD qpat_Code;
UWORD qpat_Qualifier;
};
#define QUALIFIERSPAD_NUMBER 9
static const struct QualifierPadArrayType QualifierPadArray[] =
{
{0x60, IEQUALIFIER_LSHIFT},
{0x61, IEQUALIFIER_RSHIFT},
{0x62, IEQUALIFIER_CAPSLOCK}, /* CapsLock down */
{0xe2, IEQUALIFIER_CAPSLOCK}, /* CapsLock up */
{0x63, IEQUALIFIER_CONTROL},
{0x64, IEQUALIFIER_LALT},
{0x65, IEQUALIFIER_RALT},
{0x66, IEQUALIFIER_LCOMMAND},
{0x67, IEQUALIFIER_RCOMMAND}
};
#define NO_IECODE 0xFFFF
struct CodeArrayType
{
UWORD cat_Code;
STRPTR cat_Str;
};
#define CODES_NUMBER 31
static const struct CodeArrayType CodeArray[] =
{
{0x38, "Comma"},
{0x40, "Space"},
{0x41, "BackSpace"},
{0x42, "Tab"},
{0x43, "Enter"},
{0x44, "Return"},
{0x45, "Esc"},
{0x46, "Del"},
{0x47, "Insert"},
{0x48, "Page_Up"},
{0x49, "Page_Down"},
{0x4C, "Up"},
{0x4D, "Down"},
{0x4E, "Right"},
{0x4F, "Left"},
{0x50, "F1"},
{0x51, "F2"},
{0x52, "F3"},
{0x53, "F4"},
{0x54, "F5"},
{0x55, "F6"},
{0x56, "F7"},
{0x57, "F8"},
{0x58, "F9"},
{0x59, "F10"},
{0x5F, "Help"},
{0x68, "Mouse_LeftPress"},
{0x69, "Mouse_RightPress"},
{0x6A, "Mouse_MiddlePress"},
{0x70, "Home"},
{0x71, "End"}
};