1 ///////////////////////////////////////////////////////////////////
5 // Comments with a ; in column 1 //
6 // Empty Lines ignored //
7 // The words are separated by a space, a tab, or a plus ("+") //
9 // First a [GLOBAL] section : //
16 // The GLOBAL section defines the names of the keys //
17 // and the virtual key code they have. //
18 // If you repeat a name you'll overwrite the code. //
19 // You can name the keys anything you like //
20 // The Virtual key nymber must be in Decimal //
21 // After the number you can put anything : it is ignored //
22 // Here you must put ALL the keys you'll use in the //
25 // Then the emulations sections : //
31 // VK_F1 SHIFT ^[[W etc //
36 // There are three parts : //
38 // b) the shift state //
39 // here you put compination of the words : //
51 // c) the assigned string : //
52 // you can use the ^ for esc (^[ = 0x1b) //
53 // \ and a three digit decimal number //
55 // You can't use the NULL !!! //
56 // Also (for the moment) you can't use spaces //
57 // in the string : everything after the 3rd word is //
58 // ignored - use unsderscore instead. //
62 // VK_F4 SHIFT+LEFT_ALT \0274m^[[M = 0x1b 4 m 0x1b [ M //
63 // VK_F1 RIGHT_CTRL This_is_ctrl_f1 //
65 // You may have as many sections as you like //
66 // If you repeat any section (even the GLOBAL) you'll overwrite //
67 // the common parts. //
69 ///////////////////////////////////////////////////////////////////
78 typedef TArrayAsVector
<string
> stringArray
;
82 TMapLoader(KeyTranslator
&RefKeyTrans
, TCharmap
&RefCharmap
):
83 KeyTrans(RefKeyTrans
), Charmap(RefCharmap
) {}
86 // If called more than once the new map replaces the old one.
87 // load with a different KeysetName to change keysets
89 int Load(const char * filename
, const char * szKeysetName
);
93 KeyTranslator
&KeyTrans
;
96 int LookForPart(stringArray
& sa
, const char* partType
, const char* partName
);
97 char* ParseKeyDef(const char* buf
, WORD
& vk_code
, DWORD
& control
);
99 int LoadGlobal(string
& buf
);
100 int LoadKeyMap(string buf
);
101 int LoadCharMap(string buf
);