Home | History | Annotate | Download | only in symbols
      1 // Let Space key provide No-Break Space (NBSP), Narrow No-Break Space (NNBSP),
      2 // Zero-Width Non-Joiner (ZWNJ), and Zero-Width Joiner (ZWJ) for the desired
      3 // levels.
      4 
      5 
      6 ////////////////////////////////////////
      7 // Only Space
      8 
      9 partial
     10 xkb_symbols "none" {
     11   key <SPCE> {
     12     type[Group1]="ONE_LEVEL",
     13     symbols[Group1]= [ space ]
     14   };
     15 };
     16 
     17 
     18 ////////////////////////////////////////
     19 // No-Break Space
     20 
     21 partial
     22 xkb_symbols "level2" {
     23   key <SPCE> {
     24     type[Group1]="TWO_LEVEL",
     25     symbols[Group1]= [ space, nobreakspace ]
     26   };
     27 };
     28 
     29 
     30 // level3 & level3ns provide no-breaking spaces starting from level3
     31 // This is good for typographers but experience shows many users accidently
     32 // type no-breaking spaces on the CLI (resulting in errors)
     33 // Used by fr(latin9) and lt(std)
     34 partial
     35 xkb_symbols "level3" {
     36   key <SPCE> {
     37     type[Group1]="FOUR_LEVEL",
     38     symbols[Group1]= [ space, space, nobreakspace ]
     39   };
     40 };
     41 
     42 // level3s kills fourth level
     43 // Used by ca(multix)
     44 partial
     45 xkb_symbols "level3s" {
     46   key <SPCE> {
     47     type[Group1]="FOUR_LEVEL",
     48     symbols[Group1]= [ space, space, nobreakspace, NoSymbol ]
     49   };
     50 };
     51 
     52 // for this reason pushing no-breaking spaces to level4 is the safe default nowadays
     53 partial
     54 xkb_symbols "level4" {
     55   key <SPCE> {
     56     type[Group1]="FOUR_LEVEL",
     57     symbols[Group1]= [ space, space, space, nobreakspace ]
     58   };
     59 };
     60 
     61 
     62 ////////////////////////////////////////
     63 // Narrow No-Break Space
     64 
     65 // level3n provides narrow no-breaking space in addition to the normal one
     66 partial
     67 xkb_symbols "level3n" {
     68   key <SPCE> {
     69     type[Group1]="FOUR_LEVEL",
     70     symbols[Group1]= [ space, space, nobreakspace, 0x100202F ]
     71   };
     72 };
     73 
     74 // level4n provides narrow no-breaking space in addition to the normal one
     75 partial
     76 xkb_symbols "level4n" {
     77  key <SPCE> {
     78    type[Group1]="EIGHT_LEVEL",
     79    symbols[Group1]= [ space, space, space, nobreakspace, space, 0x100202F, NoSymbol, NoSymbol ]
     80  };
     81 };
     82 
     83 // level4nl provides narrow no-breaking space in addition to the normal one
     84 // without forcing the use of level5 for mostly four-level layouts
     85 // Used by fr(oss), be(oss)
     86 partial
     87 xkb_symbols "level4nl" {
     88  key <SPCE> {
     89    type[Group1]="LOCAL_EIGHT_LEVEL",
     90    symbols[Group1]= [ space, space, space, nobreakspace, space, 0x100202F, NoSymbol, NoSymbol ]
     91  };
     92 };
     93 
     94 
     95 ////////////////////////////////////////
     96 // Zero-Width Non-Joiner & Zero-Width Joiner
     97 // Author: Behnam Esfahbod <behnam (a] esfahbod.info>
     98 
     99 // ZWNJ and ZWJ are widely used in Persian, Kurdinsh, Pashto, Uzbek and other
    100 // languages that use PersoArabic script.
    101 
    102 
    103 // ZWNJ on level 2
    104 partial
    105 xkb_symbols "zwnj2" {
    106   key <SPCE> {
    107     type[Group1]="TWO_LEVEL",
    108     symbols[Group1]= [ space, 0x100200c ]
    109   };
    110 };
    111 
    112 
    113 // ZWNJ on level 2
    114 // ZWJ on level 3
    115 partial
    116 xkb_symbols "zwnj2zwj3" {
    117   key <SPCE> {
    118     type[Group1]="FOUR_LEVEL",
    119     symbols[Group1]= [ space, 0x100200c, 0x100200d ]
    120   };
    121 };
    122 
    123 
    124 // ZWNJ on level 2
    125 // ZWJ on level 3
    126 // NBSP on level 4
    127 partial
    128 xkb_symbols "zwnj2zwj3nb4" {
    129   key <SPCE> {
    130     type[Group1]="FOUR_LEVEL",
    131     symbols[Group1]= [ space, 0x100200c, 0x100200d, nobreakspace ]
    132   };
    133 };
    134 
    135 // ZWNJ on level 2
    136 // NBSP on level 3
    137 // Used by ir(ku_ara), af(basic), af(ps), af(uz), af(olpc-fa), af(olpc-ps), af(olpc-uz)
    138 partial
    139 xkb_symbols "zwnj2nb3" {
    140   key <SPCE> {
    141     type[Group1]="FOUR_LEVEL",
    142     symbols[Group1]= [ space, 0x100200c, nobreakspace ]
    143   };
    144 };
    145 
    146 
    147 // ZWNJ on level 2
    148 // NBSP on level 3
    149 partial
    150 xkb_symbols "zwnj2nb3s" {
    151   key <SPCE> {
    152     type[Group1]="FOUR_LEVEL",
    153     symbols[Group1]= [ space, 0x100200c, nobreakspace, NoSymbol ]
    154   };
    155 };
    156 
    157 
    158 // ZWNJ on level 2
    159 // NBSP on level 3
    160 // ZWJ on level 4
    161 partial
    162 xkb_symbols "zwnj2nb3zwj4" {
    163   key <SPCE> {
    164     type[Group1]="FOUR_LEVEL",
    165     symbols[Group1]= [ space, 0x100200c, nobreakspace, 0x100200d ]
    166   };
    167 };
    168 
    169 
    170 // ZWNJ on level 2
    171 // NBSP on level 3
    172 // NNBSP on level 4
    173 // Used by ir(pes)
    174 partial
    175 xkb_symbols "zwnj2nb3nnb4" {
    176   key <SPCE> {
    177     type[Group1]="FOUR_LEVEL",
    178     symbols[Group1]= [ space, 0x100200c, nobreakspace, 0x100202F ]
    179   };
    180 };
    181 
    182 
    183 // ZWNJ on level 3
    184 // ZWJ on level 4
    185 // Used by in(deva), in(olpc)
    186 partial
    187 xkb_symbols "zwnj3zwj4" {
    188   key <SPCE> {
    189     type[Group1]="FOUR_LEVEL",
    190     symbols[Group1]= [ space, space, 0x100200c, 0x100200d ]
    191   };
    192 };
    193 
    194 
    195 // NBSP on level 2
    196 // ZWNJ on level 3
    197 // Used by lk(sin_phonetic)
    198 partial
    199 xkb_symbols "nb2zwnj3s" {
    200   key <SPCE> {
    201     type[Group1]="FOUR_LEVEL",
    202     symbols[Group1]= [ space, nobreakspace, 0x100200c, NoSymbol ]
    203   };
    204 };
    205