1 ///////////////////////////////////////////////////////////////////////////////
2 //Telnet Win32 : an ANSI telnet client.
3 //Copyright (C) 1998-2000 Paul Brannan
4 //Copyright (C) 1998 I.Ioannou
5 //Copyright (C) 1997 Brad Johnson
7 //This program is free software; you can redistribute it and/or
8 //modify it under the terms of the GNU General Public License
9 //as published by the Free Software Foundation; either version 2
10 //of the License, or (at your option) any later version.
12 //This program is distributed in the hope that it will be useful,
13 //but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 //GNU General Public License for more details.
17 //You should have received a copy of the GNU General Public License
18 //along with this program; if not, write to the Free Software
19 //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 ///////////////////////////////////////////////////////////////////////////
26 /////////////////////////////////////////////////////////
27 // Class TkeyMap - Key Mappings //
28 // - kept in an array container //
29 // originally part of KeyTrans.cpp //
30 /////////////////////////////////////////////////////////
34 KeyMap::KeyMap(DWORD state
, DWORD code
): map(0,0,sizeof(TKeyDef
)),
35 key(NULL
,state
,code
) {};
37 KeyMap::KeyMap(TKeyDef
&tk
):map(0,0,sizeof(TKeyDef
)){
40 KeyMap::KeyMap(TKeyDef
&tk
, string
& t
):map(0,0,sizeof(TKeyDef
)), orig(t
){
44 int KeyMap::operator==(const KeyMap
& t
) const{
48 KeyMap
& KeyMap::operator = (const KeyMap
& t
){
56 bool operator<(const KeyMap
&t1
, const KeyMap
&t2
) {
57 return t1
.key
< t2
.key
;