Home | History | Annotate | Line # | Download | only in symbols
cn revision 1.1.1.6
      1 //
      2 // Default Chinese is the same as American
      3 //
      4 default  partial alphanumeric_keys
      5 xkb_symbols "basic" {
      6     include "us(basic)"
      7 
      8     name[Group1]= "Chinese";
      9 };
     10 
     11 // Tibetan Standard Keyboard map for XKB/X.org
     12 //
     13 // Based on the CNS Tibetan keyboard as supported by Windows Vista
     14 // using information published by Tashi Tsering:
     15 // http://www.yalasoo.com/English/docs/yalasoo_en_MStbKb.html
     16 //
     17 // XKB version by Rich Felker <dalias (a] aerifal.cx>.
     18 //
     19 // The CNS Tibetan keyboard standard specifies 5 keyboards worth of keys,
     20 // but apparently makes no requirements about how each is accessed. Only
     21 // the first 2 are needed for native Tibetan text; the remainder are
     22 // filled with special symbols and letters for transliterating foreign
     23 // text. Further, CNS leaves the level of support of keyboards 2-5 as an
     24 // option to the implementor (despite the fact that #2 is absolutely
     25 // essential...). Windows Vista maps them as follows:
     26 //
     27 // 1. Unshifted
     28 // 2. "m"-key-prefixed
     29 // 3. Shift-modified
     30 // 4. Ctrl+Alt+Shift-modified
     31 // 5. "M"-key-prefixed
     32 //
     33 // I roughly copy the Windows Vista mapping, which was intended by the
     34 // designer of the keyboard, with the following exceptions:
     35 //
     36 // The fifth keyboard is almost empty and contains only precomposed forms
     37 // of subjoined letter characters whose use is strongly discouraged, and
     38 // is not implemented at all in this XKB map. The fourth is implemented,
     39 // but is accessed by an "m"-prefix (or "M"-prefix, for convenience)
     40 // followed by a Shift-modified key. This avoids stealing the Ctrl and Alt
     41 // keys, which belong to applications on *nix and not to the keyboard or
     42 // input method. Aside from enterring rare special symbols and
     43 // foreign-word-transliteration letters, these differences should not
     44 // affect users.
     45 //
     46 // Implementation notes:
     47 //
     48 // A latching ISO Level3 shift is used for the "m"-prefix modifier. In
     49 // principle moving it to other keys (e.g. AltGr) would be possible
     50 // according to user preference, but this is not practical for typing
     51 // Tibetan, since the subjoined consonants, of which Tibetan has 0-2 per
     52 // syllable, are accessed via this mechanism.
     53 //
     54 // One annoyance is that the latching Level3 shift fails to work if the
     55 // previous key is not yet released when "m" is pressed (the key release
     56 // event kills the latch). I consider this a bug in X and don't know an
     57 // easy way to work around it. Complain to the maintainers if it bothers
     58 // you and maybe they'll find a fix. You won't notice it unless you're
     59 // fast at typing Tibetan anyway.
     60 
     61 partial alphanumeric_keys
     62 xkb_symbols "tib" {
     63 
     64     name[Group1]= "Tibetan";
     65 
     66     key <TLDE> { [ 0x1000f68, 0x1000f01, 0x1000fb8, 0x1000f00 ] }; #    
     67     key <AE01> { [ 0x1000f21, 0x1000f2a, 0x1000f04, 0x1000f76 ] }; #    
     68     key <AE02> { [ 0x1000f22, 0x1000f2b, 0x1000f05, 0x1000f77 ] }; #    
     69     key <AE03> { [ 0x1000f23, 0x1000f2c, 0x1000f7e, 0x1000f78 ] }; #    
     70     key <AE04> { [ 0x1000f24, 0x1000f2d, 0x1000f83, 0x1000f79 ] }; #    
     71     key <AE05> { [ 0x1000f25, 0x1000f2e, 0x1000f37, 0x1000f81 ] }; #    
     72     key <AE06> { [ 0x1000f26, 0x1000f2f, 0x1000f35, 0x1000f09 ] }; #    
     73     key <AE07> { [ 0x1000f27, 0x1000f30, 0x1000f7f, 0x1000f0a ] }; #    
     74     key <AE08> { [ 0x1000f28, 0x1000f31, 0x1000f14, 0x1000f0f ] }; #    
     75     key <AE09> { [ 0x1000f29, 0x1000f32, 0x1000f11, 0x1000f10 ] }; #    
     76     key <AE10> { [ 0x1000f20, 0x1000f33, 0x1000f08, 0x1000f12 ] }; #    
     77     key <AE11> { [ 0x1000f67, 0x1000f3c, 0x1000fb7, 0x1000f0c ] }; #    
     78     key <AE12> { [ 0x1000f5d, 0x1000f3d, 0x1000fba, 0x1000f13 ] }; #    
     79 
     80     key <AD01> { [ 0x1000f45, 0x1000f15, 0x1000f95, 0x1000f89 ] }; #    
     81     key <AD02> { [ 0x1000f46, 0x1000f16, 0x1000f96, 0x1000f88 ] }; #    
     82     key <AD03> { [ 0x1000f7a, 0x1000f17, 0x1000f7b, 0x1000fbe ] }; #    
     83     key <AD04> { [ 0x1000f62, 0x1000fbc, 0x1000fb2, 0x1000f6a ] }; #    
     84     key <AD05> { [ 0x1000f4f, 0x1000f4a, 0x1000f9f, 0x1000f9a ] }; #    
     85     key <AD06> { [ 0x1000f61, 0x1000fbb, 0x1000fb1, 0x1000fbf ] }; #    
     86     key <AD07> { [ 0x1000f74, 0x1000f18, 0x1000fad, 0x1000f75 ] }; #    
     87     key <AD08> { [ 0x1000f72, 0x1000f19, 0x1000f80, 0x1000f73 ] }; #    
     88     key <AD09> { [ 0x1000f7c, 0x1000f1a, 0x1000f7d, 0x1000fc0 ] }; #    
     89     key <AD10> { [ 0x1000f55, 0x1000f1b, 0x1000fa5, 0x1000fc1 ] }; #    
     90     key <AD11> { [ 0x1000f59, 0x1000f1c, 0x1000fa9, 0x1000fc2 ] }; #    
     91     key <AD12> { [ 0x1000f5a, 0x1000f1d, 0x1000faa, 0x1000fc3 ] }; #    
     92     key <BKSL> { [ 0x1000f5b, 0x1000f1e, 0x1000fab, 0x1000f5c ] }; #    
     93 
     94     key <AC01> { [ 0x1000f60, 0x1000f71, 0x1000fb0, 0x1000fc4 ] }; #    
     95     key <AC02> { [ 0x1000f66, 0x1000f1f, 0x1000fb6, 0x1000fc5 ] }; #    
     96     key <AC03> { [ 0x1000f51, 0x1000f4c, 0x1000fa1, 0x1000f9c ] }; #    
     97     key <AC04> { [ 0x1000f56, 0x1000f3e, 0x1000fa6, 0x1000f57 ] }; #    
     98     key <AC05> { [ 0x1000f44, 0x1000f3f, 0x1000f94, 0x1000fc6 ] }; #    
     99     key <AC06> { [ 0x1000f58, 0x1000fcf, 0x1000fa8, 0x1000fc7 ] }; #    
    100     key <AC07> { [ 0x1000f0b, 0x1000f02, 0x1000f84, 0x1000fc8 ] }; #    
    101     key <AC08> { [ 0x1000f42, 0x1000f03, 0x1000f92, 0x1000f43 ] }; #    
    102     key <AC09> { [ 0x1000f63, 0x1000f06, 0x1000fb3, 0x1000fc9 ] }; #    
    103     key <AC10> { [ 0x1000f5e, 0x1000f07, 0x1000fae, 0x1000fca ] }; #    
    104     key <AC11> { [ 0x1000f0d, 0x1000f38, 0x1000f0e, 0x1000fcb ] }; #    
    105 
    106     key <AB01> { [ 0x1000f5f, 0x1000f34, 0x1000faf, 0x1000fcc ] }; #    
    107     key <AB02> { [ 0x1000f64, 0x1000f65, 0x1000fb4, 0x1000fb5 ] }; #    
    108     key <AB03> { [ 0x1000f40, 0x1000f69, 0x1000f90, 0x1000fb9 ] }; #    
    109     key <AB04> { [ 0x1000f41, 0x1000f87, 0x1000f91, 0x1000f36 ] }; #    
    110     key <AB05> { [ 0x1000f54, 0x1000f86, 0x1000fa4, 0x1000f82 ] }; #    
    111     key <AB06> { [ 0x1000f53, 0x1000f4e, 0x1000fa3, 0x1000f9e ] }; #    
    112     key <AB07> { [ ISO_Level3_Latch, ISO_Level3_Latch, 0x1000f85, 0x1000f52 ] }; # -  
    113     key <AB08> { [ 0x1000f50, 0x1000f4b, 0x1000fa0, 0x1000f9b ] }; #    
    114     key <AB09> { [ 0x1000f47, 0x1000f3a, 0x1000f97, 0x1000f8b ] }; #    
    115     key <AB10> { [ 0x1000f49, 0x1000f3b, 0x1000f99, 0x1000f8a ] }; #    
    116 
    117 };
    118 
    119 // Tibetan Standard Keyboard with ASCII numerals
    120 //
    121 // Users may prefer that the numeral keys enter ASCII numerals instead of
    122 // Tibetan numerals, since the latter are not in modern use in Tibet.
    123 // This is especially an issue for laptop users who do not have a numeric
    124 // keypad by which to access the ASCII numerals, and who need to type
    125 // numbers to be interpreted by applications.
    126 //
    127 // In this mapping, the Shift-modified numeral keys generate Tibetan
    128 // numerals, since it was unclear to me that the standard Latin punctuation
    129 // keys would be any use without Latin letters. (One can imagine wanting to
    130 // type an email address using the @ sign, but as of present non-ASCII
    131 // email addresses are not possible.) This mapping may change in the future
    132 // if a clearly better use for the shifted numerals is pointed out by users.
    133 
    134 partial alphanumeric_keys
    135 xkb_symbols "tib_asciinum" {
    136     include "cn(tib)"
    137 
    138     name[Group1]= "Tibetan (with ASCII numerals)";
    139 
    140     key <AE01> { [ 1, 0x1000f21, 0x1000f04, 0x1000f76 ] }; # 1   
    141     key <AE02> { [ 2, 0x1000f22, 0x1000f05, 0x1000f77 ] }; # 2   
    142     key <AE03> { [ 3, 0x1000f23, 0x1000f7e, 0x1000f78 ] }; # 3   
    143     key <AE04> { [ 4, 0x1000f24, 0x1000f83, 0x1000f79 ] }; # 4   
    144     key <AE05> { [ 5, 0x1000f25, 0x1000f37, 0x1000f81 ] }; # 5   
    145     key <AE06> { [ 6, 0x1000f26, 0x1000f35, 0x1000f09 ] }; # 6   
    146     key <AE07> { [ 7, 0x1000f27, 0x1000f7f, 0x1000f0a ] }; # 7   
    147     key <AE08> { [ 8, 0x1000f28, 0x1000f14, 0x1000f0f ] }; # 8   
    148     key <AE09> { [ 9, 0x1000f29, 0x1000f11, 0x1000f10 ] }; # 9   
    149     key <AE10> { [ 0, 0x1000f20, 0x1000f08, 0x1000f12 ] }; # 0   
    150 };
    151 
    152 // Uyghur Standard Keyboard Map for XKB/X.Org
    153 //
    154 // XKB version in collaboration by Muhemmed Abdullah <muhammad (a] yulghun.com>,
    155 // Abdussalam Abdurrahman <abdusalam.abdurahman (a] gmail.com>, and
    156 // Ekrem Tomur <ekrem.tomur (a] gmail.com>
    157 
    158 partial alphanumeric_keys
    159 xkb_symbols "ug" {
    160     include "us(basic)"
    161 
    162     name[Group1]= "Uyghur";
    163 
    164     key <AE09> { [ 9,                parenright           ] };  // 9 )
    165     key <AE10> { [ 0,                parenleft            ] };  // 0 (
    166     key <AE11> { [ minus,            0x1002014            ] };  // - 
    167 
    168     key <AD01> { [ 0x1000686,        VoidSymbol           ] };  // 
    169     key <AD02> { [ 0x10006cb,        VoidSymbol           ] };  // 
    170     key <AD03> { [ 0x10006d0,        VoidSymbol           ] };  // 
    171     key <AD04> { [ 0x1000631,        VoidSymbol           ] };  // 
    172     key <AD05> { [ 0x100062a,        VoidSymbol           ] };  // 
    173     key <AD06> { [ 0x100064a,        VoidSymbol           ] };  // 
    174     key <AD07> { [ 0x10006c7,        VoidSymbol           ] };  // 
    175     key <AD08> { [ 0x10006ad,        VoidSymbol           ] };  // 
    176     key <AD09> { [ 0x1000648,        VoidSymbol           ] };  // 
    177     key <AD10> { [ 0x100067e,        VoidSymbol           ] };  // 
    178     key <AD11> { [ bracketright,     guillemotright       ] };  // ] 
    179     key <AD12> { [ bracketleft,      guillemotleft        ] };  // [ 
    180 
    181     key <AC01> { [ 0x10006be,        VoidSymbol           ] };  // 
    182     key <AC02> { [ 0x1000633,        VoidSymbol           ] };  // 
    183     key <AC03> { [ 0x100062f,        0x1000698            ] };  //  
    184     key <AC04> { [ 0x1000627,        0x1000641            ] };  //  
    185     key <AC05> { [ 0x10006d5,        0x10006af            ] };  //  
    186     key <AC06> { [ 0x1000649,        0x100062e            ] };  //  
    187     key <AC07> { [ 0x1000642,        0x100062c            ] };  //  
    188     key <AC08> { [ 0x1000643,        0x10006c6            ] };  //  
    189     key <AC09> { [ 0x1000644,        VoidSymbol           ] };  // 
    190     key <AC10> { [ Arabic_semicolon, colon                ] };  //  :
    191 
    192     key <AB01> { [ 0x1000632,        VoidSymbol           ] };  // 
    193     key <AB02> { [ 0x1000634,        VoidSymbol           ] };  // 
    194     key <AB03> { [ 0x100063a,        VoidSymbol           ] };  // 
    195     key <AB04> { [ 0x10006c8,        VoidSymbol           ] };  // 
    196     key <AB05> { [ 0x1000628,        VoidSymbol           ] };  // 
    197     key <AB06> { [ 0x1000646,        VoidSymbol           ] };  // 
    198     key <AB07> { [ 0x1000645,        VoidSymbol           ] };  // 
    199     key <AB08> { [ Arabic_comma,     0x100203a            ] };  //  
    200     key <AB09> { [ period,           0x1002039            ] };  // . 
    201     key <AB10> { [ 0x1000626,        Arabic_question_mark ] };  //  
    202 };
    203 
    204 // Pinyin Keyboard, in the style of altgr-intl
    205 //
    206 // Chinese speakers and learners often find it hard to type Hanyu Pinyin
    207 // with all its tones and . This rule defines an altgr-intl-like behavior,
    208 // with dead keys activated by "AltGr + <key>". It also works with many
    209 // "pinyin" extensions, such as Tongyong Pinyin (Taiwan Mandarin) and
    210 // various SASM/GNC romanizations.
    211 //
    212 // Number row keys 1 2 3 4 are defined as dead-keys for the tones.
    213 // They correspond to the four tones in Hanyu Pinyin.
    214 //
    215 // To generate a  for "neutral" syllables, use AltGr + ` (grave).
    216 // To generate a raw , use AltGr + v.
    217 // V is used instead of  for tones.
    218 //
    219 // AltGr+Shift+` triggers dead_abovering (), used by the Taiwanese
    220 // Tongyong Pinyin variant for the "neutral" tone.
    221 //
    222 // AltGr+6 triggers dead_circumflex (^) for    , etc.
    223 // These can be stacked after tones to produce  and ; other tones require
    224 // combining characters, available through nobreakspace (AltGr+Space).
    225 //
    226 // AltGr+Shift+6 triggers dead_diaeresis () for SASM/GNC
    227 // romanization of tib, mon, and ug.
    228 //
    229 // This file should be used with an appropriate XCompose file with
    230 // definitons for dead_{macron,acute,caron,grave} + a/e/i/o/u/v().
    231 // --Mingye Wang <arthur200126 (a] gmail.com>
    232 
    233 partial alphanumeric_keys
    234 xkb_symbols "altgr-pinyin" {
    235    include "us(basic)"
    236    name[Group1]= "Hanyu Pinyin (altgr)";
    237 
    238    key <TLDE> { [      grave,	asciitilde,  periodcentered,dead_abovering ]	};
    239    key <AE01> { [	   1,	exclam,		dead_macron,	    macron ]	};
    240    key <AE02> { [	   2,	at,		dead_acute,	     acute ]	};
    241    key <AE03> { [	   3,	numbersign,	dead_caron,	     caron ]	};
    242    key <AE04> { [	   4,	dollar,		dead_grave,	     grave ]	};
    243 
    244    key <AE06> { [	   6,	asciicircum,	dead_circumflex, dead_diaeresis ]	};
    245    key <AB04> {	[	   v,	V,		udiaeresis,	Udiaeresis ]	};
    246 
    247    key <SPCE>  { [     space,   space,	      nobreakspace,   nobreakspace ]	};
    248 
    249    include "level3(ralt_switch)"
    250 };
    251 
    252