1 /////////////////////////////////////////////////////////
2 // TkeyDef - Key Definitions class //
3 // - keeped in an array container //
4 /////////////////////////////////////////////////////////
11 #ifndef __BORLANDC__ // Ioannou Dec. 8, 1998
12 // We need these for MSVC6 (Sam Robertson Oct. 8, 1998)
14 bool operator==(const TKeyDef
&t1
, const TKeyDef
&t2
);
15 bool operator<(const TKeyDef
&t1
, const TKeyDef
&t2
);
19 // Paul Brannan Feb. 5, 1999
20 enum tn_ops
{TN_ESCAPE
, TN_SCROLLBACK
, TN_DIAL
, TN_PASTE
, TN_NULL
, TN_CR
, TN_CRLF
};
32 union KeyDefType_const
{
45 TKeyDef(char *def
, DWORD state
, DWORD code
);
46 TKeyDef(optype op
, DWORD state
, DWORD code
);
47 TKeyDef(const TKeyDef
&t
);
49 char *operator=(char *def
);
50 DWORD
operator=(DWORD code
);
51 TKeyDef
& operator=(const TKeyDef
&t
);
52 const optype
& operator=(optype op
);
57 int operator==(TKeyDef
&t
);
59 // made these into friends for compatibility with stl
60 // (Paul Brannan 5/7/98)
61 friend bool operator==(const TKeyDef
&t1
, const TKeyDef
&t2
);
62 friend bool operator<(const TKeyDef
&t1
, const TKeyDef
&t2
);
65 const char *GetszKey() { return uKeyDef
.szKeyDef
; }
66 const KeyDefType
GetKeyDef() { return uKeyDef
; }
67 DWORD
GetCodeKey() { return vk_code
; }