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