1 // X Keyboard Extension file for Sinhala (Sri Lanka) (2004-04-22) 2 // Maintainer : Harshula Jayasuriya <harshula (a] gmail.com> 3 // Last Updated: 2011-05-25 4 // This is a phonetic static mapping for a standard US-English keyboard 5 // (QWERTY) 6 // http://www.nongnu.org/sinhala/doc/keymaps/sinhala-keyboard_3.html 7 8 // Repaya, Rakaransaya and Yansaya aren't inserted with A-r, R and Y, 9 // respectively. The problem lies with the XKB infrastructure which 10 // only allows a one-to-one mapping of keycodes to Unicode codepoints. 11 // Unfortunately, the 3 mentioned glyphs actually consists of 3 12 // Unicode codepoints each. The result is that the user must 13 // manually construct the glyph by typing each of the 3 codepoints. 14 // ALT-, represents the 'JOIN' key, it requires 15 // two codepoints, hence it also has to be manually constructed. 16 // Similarly, ALT-/ representing the 'TOUCH' key requires 17 // two codepoints. 18 19 // Repaya = rayanna,AL,ZWJ 20 // Rakaransaya = AL,ZWJ,rayanna 21 // Yansaya = AL,ZWJ,yayanna 22 // JOIN = AL,ZWJ 23 // TOUCH = ZWJ,AL 24 25 // Where, 26 // AL = Al Lakuna = ALT-a 27 // ZWJ = Zero Width Joiner = ALT-/ 28 // rayanna = r 29 // yayanna = y 30 31 default partial alphanumeric_keys 32 xkb_symbols "sin_phonetic" { 33 34 include "us" 35 name[Group1] = "Sinhala (phonetic)"; 36 key.type[Group1] = "FOUR_LEVEL"; 37 38 // q - p 39 key <AD01> { [ Sinh_ri, Sinh_rii, Sinh_ru2, Sinh_ruu2 ] }; 40 key <AD02> { [ Sinh_ae, Sinh_aee, Sinh_ae2, Sinh_aee2 ] }; 41 key <AD03> { [ Sinh_e, Sinh_ee, Sinh_e2, Sinh_ee2 ] }; 42 key <AD04> { [ Sinh_ra, Sinh_al, Sinh_ra, NoSymbol ] }; 43 key <AD05> { [ Sinh_tha, Sinh_thha, Sinh_tta, Sinh_ttha ] }; 44 key <AD06> { [ Sinh_ya, Sinh_al, NoSymbol, NoSymbol ] }; 45 key <AD07> { [ Sinh_u, Sinh_uu, Sinh_u2, Sinh_uu2 ] }; 46 key <AD08> { [ Sinh_i, Sinh_ii, Sinh_i2, Sinh_ii2 ] }; 47 key <AD09> { [ Sinh_o, Sinh_oo, Sinh_o2, Sinh_oo2 ] }; 48 key <AD10> { [ Sinh_pa, Sinh_pha, NoSymbol, NoSymbol ] }; 49 50 // a - l 51 key <AC01> { [ Sinh_a, Sinh_aa, Sinh_al, Sinh_aa2 ] }; 52 key <AC02> { [ Sinh_sa, Sinh_sha, Sinh_ssha, NoSymbol ] }; 53 key <AC03> { [ Sinh_dha, Sinh_dhha, Sinh_dda, Sinh_ddha ] }; 54 key <AC04> { [ Sinh_fa, NoSymbol, Sinh_ai2, Sinh_ai ] }; 55 key <AC05> { [ Sinh_ga, Sinh_gha, Sinh_nga, NoSymbol ] }; 56 key <AC06> { [ Sinh_ha, Sinh_h2, Sinh_au2, Sinh_au ] }; 57 key <AC07> { [ Sinh_ja, Sinh_jha, Sinh_nja, NoSymbol ] }; 58 key <AC08> { [ Sinh_ka, Sinh_kha, Sinh_lu, Sinh_luu ] }; 59 key <AC09> { [ Sinh_la, Sinh_lla, Sinh_lu2, Sinh_luu2 ] }; 60 61 // z - ? 62 key <AB01> { [ Sinh_nya, Sinh_jnya, NoSymbol, NoSymbol ] }; 63 key <AB02> { [ Sinh_ndha, Sinh_ndda, NoSymbol, NoSymbol ] }; 64 key <AB03> { [ Sinh_ca, Sinh_cha, NoSymbol, NoSymbol ] }; 65 key <AB04> { [ Sinh_va, NoSymbol, NoSymbol, NoSymbol ] }; 66 key <AB05> { [ Sinh_ba, Sinh_bha, NoSymbol, NoSymbol ] }; 67 key <AB06> { [ Sinh_na, Sinh_nna, Sinh_ng, Sinh_ng2 ] }; 68 key <AB07> { [ Sinh_ma, Sinh_mba, NoSymbol, NoSymbol ] }; 69 key <AB08> { [ any, any, Sinh_al, NoSymbol ] }; 70 key <AB09> { [ any, any, Sinh_kunddaliya, NoSymbol ] }; 71 key <AB10> { [ any, any, 0x100200d, NoSymbol ] }; 72 73 // Space 74 include "nbsp(nb2zwnj3s)" 75 76 include "level3(ralt_switch)" 77 }; 78 79 partial alphanumeric_keys 80 xkb_symbols "tam_unicode" { 81 include "in(tamilnet)" 82 name[Group1]= "Tamil (Sri Lanka, TamilNet '99)"; 83 }; 84 85 partial alphanumeric_keys 86 xkb_symbols "tam_TAB" { 87 include "in(tamilnet_TAB)" 88 name[Group1]= "Tamil (Sri Lanka, TamilNet '99, TAB encoding)"; 89 }; 90 91 // SINHALA - US, SUBSTITUTES SOME AND ADDS SOME 92 // ============================================= 93 // 94 // This started as an upgrade to the first romanized version of 95 // Sinhala called PTS Pali created in the 1860s. PTS requires 96 // dots and bars on letters that are rare in fonts, and impossible 97 // to type. Its singular purpose was to print Tripitaka, the 98 // collection of Buddhist discourses. 99 // 100 // This version covers the entire newer Sinhala phoneme chart 101 // (Hodiya) that became standard just before the end of the 19th 102 // century. All the phonemes map to the SBCS. It is easy and 103 // faster than English to type. It overcomes the setback of 104 // Unicode Sinhala that it is not compatible with Pali and 105 // Sanskrit because it encodes two ligatures as base letters and 106 // the SLS1134 specification matching shape and morpheme sets 107 // violating Sanskrit orthography. 108 // 109 // Most importantly, this romanized version of Sinhala has a 110 // companion orthographic font that displays the text in the 111 // native script and a JavaScript converts it to Unicode Sinhala 112 // and back dramatically increasing Sinhala seen on the web due 113 // to its ease of use 114 // 115 // Dedication: 116 // Thomas William Rhys Davids, Ven. Udagama Sumangala 117 // Rev. Fr. A. M. Gunasekara, Rev. Fr. Theodore G. Perera 118 // Ven. Mettavihari 119 // 120 // Maintainer: 121 // JC Ahangama - sing (a] ahangama.com 122 // 123 partial alphanumeric_keys modifier_keys 124 xkb_symbols "us" { 125 include "us(basic)" 126 name[Group1]= "Sinhala (US, with Sinhala letters)"; 127 // 128 // UNSHIFTED, SHIFT, ALT 129 // -------------------------------------------- 130 // 131 key <AB01> { [ z, VoidSymbol, VoidSymbol ] }; 132 key <AB02> { [ x, VoidSymbol, VoidSymbol ] }; 133 key <AB03> { [ c, ccedilla, VoidSymbol ] }; 134 key <AB04> { [ v, VoidSymbol, VoidSymbol ] }; 135 key <AB05> { [ b, B, VoidSymbol ] }; 136 key <AB06> { [ n, N, ntilde ] }; 137 key <AB07> { [ m, VoidSymbol, VoidSymbol ] }; 138 key <AB08> { [ comma, less, guillemotleft ] }; 139 key <AB09> { [ period, greater,guillemotright ] }; 140 key <AB10> { [ slash, question, U200C ] }; 141 142 key <AC01> { [ a, aacute, adiaeresis ] }; 143 key <AC02> { [ s, VoidSymbol, VoidSymbol ] }; 144 key <AC03> { [ eth, ETH, VoidSymbol ] }; 145 key <AC04> { [ thorn, f, VoidSymbol ] }; 146 key <AC05> { [ g, G, VoidSymbol ] }; 147 key <AC06> { [ h, VoidSymbol, VoidSymbol ] }; 148 key <AC07> { [ j, ccedilla, VoidSymbol ] }; 149 key <AC08> { [ k, VoidSymbol, VoidSymbol ] }; 150 key <AC09> { [ l, L, ocircumflex ] }; 151 key <AC10> { [ semicolon, colon, VoidSymbol ] }; 152 key <AC11> { [ apostrophe, quotedbl, VoidSymbol ] }; 153 154 key <AD01> { [ d, D, q ] }; 155 key <AD02> { [ ae, acute, VoidSymbol ] }; 156 key <AD03> { [ e, eacute, ediaeresis ] }; 157 key <AD04> { [ r, ucircumflex, VoidSymbol ] }; 158 key <AD05> { [ t, VoidSymbol, VoidSymbol ] }; 159 key <AD06> { [ y, VoidSymbol, VoidSymbol ] }; 160 key <AD07> { [ u, uacute, udiaeresis ] }; 161 key <AD08> { [ i, iacute, idiaeresis ] }; 162 key <AD09> { [ o, oacute, odiaeresis ] }; 163 key <AD10> { [ p, VoidSymbol, VoidSymbol ] }; 164 key <AD11> { [ bracketleft, braceleft, VoidSymbol ] }; 165 key <AD12> { [ bracketright, braceright, VoidSymbol ] }; 166 167 key <AE01> { [ 1, exclam, dead_macron ] }; 168 key <AE02> { [ 2, at, dead_belowdot ] }; 169 key <AE03> { [ 3, numbersign, dead_abovedot ] }; 170 key <AE04> { [ 4, dollar, currency ] }; 171 key <AE05> { [ 5, percent, degree ] }; 172 key <AE06> { [ 6, asciicircum, onequarter ] }; 173 key <AE07> { [ 7, ampersand, onehalf ] }; 174 key <AE08> { [ 8, asterisk, threequarters ] }; 175 key <AE09> { [ 9, parenleft, VoidSymbol ] }; 176 key <AE10> { [ 0, parenright, VoidSymbol ] }; 177 key <AE11> { [ minus, underscore, emdash ] }; 178 key <AE12> { [ equal, plus, VoidSymbol ] }; 179 180 key <BKSL> { [ backslash, bar, VoidSymbol ] }; 181 key <SPCE> { [ space, nobreakspace, VoidSymbol ] }; 182 key <TLDE> { [ grave, asciitilde, VoidSymbol ] }; 183 include "level3(alt_switch)" 184 }; 185