o cin is cin2tab's native format, it's from xcin originally, but now CCE's cin file has lots of different keywords. /************************************************************************************************** * * CIN (Chinese Input File) Format * * # This is a comment line * # # is used for a comment line, cin2tab will skip this line * # * [%gen_inp] * # This is for compatibility with XCIN, not used * # * [%encoding|%coding N] * # specifiy the encoding of this input table, otherwise you need to use command * # line options -gb|-gbk|-big5|-jis|-ksc etc to specify it * # * [%ename ENGNAME] * # specify the English name for this input method * # * [%cname|%prompt CHNAME] * # specify the Chinese name for this input method * # * [%selkey xxxxxxxx] * # specify the select keys(used to select the candidate), usually 1234567890(default) * # needs to be printable, can't accept \0 \x format * # * [%dupsel n] * # specify the number of select keys, or cin2tab will get it from &selkey * # * [%endkey yyyy] * # This is for compatibility with XCIN, not used * # * [%pageprevkey xxxx] * # specify the PrevPage keys, default is ",<-[" optional * # needs not to be printable, can accept \0 \x format, max 7 keys * # * [%pagenextkey xxxx] * # specify the NextPage keys, default is ".>=]" optional * # needs not to be printable, can accept \0 \x format, max 7 keys * # (Big5 tradition, SPACE is also a NextPage key for Zhuyin/CangJie/Simplex) * # * [%selfirstkey xxxx] * # specify the key used to select first candidate, default is SPACE * # needs not to be printable, can accept \0 \x format, max 3 keys * # for example: SPACE \032 * # * [%wildcardkey x] * # specify the WildCard key which can match any input keys * # default is '?' can't be one of the input key or select keys * # * [%maxpress n] * # specify the maximum keys, maxpress will be generated by parsing the CIN file * # the %maxpress is just for compatibility and information only * # * [%last_full|%auto_select 0|1] * # if it's 1, when maxpress key is input and there is only one candidate, CCE will * # automatically output this candidate, good for something like WuBi * # * [%key_prompt 0|1] * # if it's 1, CCE will display the uninput key for the candidates, like in Windows * # good for sth like WuBi/CangJie. Default is off * # * [%left_shift 0|1] * # if it's 1(default), you can use Left-Shift to temporary enter English mode * # press Left-Shift again to go back to Chinese input mode * # * [%prefix_match 0|1] * # if it's 1(default), display candidates with the input keys as prefix(prefix match) * # otherwise, it's exact match, only display candidates with the current input keys * # * [%key_len|%keylen n] n=5/6, 6 is default * # CCE will use either 5 or 6 bits to encode each key, so one 32 bits integer can * # hold 6 or 5 keys. If you omit this, cin2tab will calculate it from %keyname * # CCE uses 1-2 integers to hold the keys(so max 10-12 keys). It will determine * # that by %maxpress and %keylen. * # * * %keyname begin * * * ... * * %keyname end * # * # keyname section will define all the input keys and it's display format(may be * # different than the key, like in some Big5 input methods) * # * * [%chardef begin] * KEY1 PHRASE1 [PHRASE2] ... [PHRASEn] * KEY2 PHRASE1 [PHRASE2] ... [PHRASEn] * ... * KEYm PHRASE1 [PHRASE2] ... [PHRASEn] * [%chardef end] * # * # This is the key->char/phrase mapping section, you can put multiple char/phrases * # in the same line, separated by SPACE or TAB. Some cxterm's tit uses such format * # KEY CHAR1CHAR2CHAR3...CHARN * # There is no SPACE/TAB between chars, in such case, you need to use -charonly * # command line option so cin2tab will treat it as single characters instead of * # phrase. * # * # For compatibility, cin2tab will also support the following format: * # PhraseKey (no space between Phrase(Chinese) and Key(ASCII) * # Phrase Key (with SPACE or TAB between Phrase and Key) * # KeyPhrase1 [Phrase2] ... * # *************************************************************************************************/ o cin2tab can also (partly) support Microsoft's MaBiao format: [Description] Name=ChineseName MaxxCodes=n MaxElement=1 UsedCodes=/abcdefghijklmnoprstuvwxyz WildChar=q NumRules=3 [Rule] rule ... rule [Text] PhraseKey ... PhraseKey cin2tab will ignore most of the keywords except "Name=", "UsedCodes=" and "WildChar=". After "[Text]", it's the actual phrase->key mapping, there is no SPACE/TAB between them. o cin2tab can also support pure mapping format(without any % keyword) In this case, the input keys will be default ones(a-z) and select keys are 0-9. Format1: Key Phrase [Phrase...] Format2: KeyPhrase [Phrase...] Format3: Phrase Key Format4: PhraseKey