summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehnam Esfahbod <behnam@zwnj.org>2009-09-17 20:00:03 +0430
committerSergey V. Udaltsov <svu@gnome.org>2010-01-29 00:44:58 +0000
commit7d040017f02861a44c355ddccade30d644148bc6 (patch)
treeed6089cccd1b6b7e1fd25676d604d461161da16c
parenteee5b749bbb90ab99d91b5d1da098cb2a4c6b0ff (diff)
downloadxkeyboard-config-7d040017f02861a44c355ddccade30d644148bc6.tar.gz
Add ZWNJ/ZWJ parts to nbsp group
- Add 8 options for ZWNJ and ZWJ on space key to nbsp group - Use the partial layouts in af, in, ir, lk, sy
-rw-r--r--rules/base.xml.in50
-rw-r--r--symbols/af15
-rw-r--r--symbols/in5
-rw-r--r--symbols/ir26
-rw-r--r--symbols/lk2
-rw-r--r--symbols/nbsp130
-rw-r--r--symbols/sy3
7 files changed, 199 insertions, 32 deletions
diff --git a/rules/base.xml.in b/rules/base.xml.in
index 661189f..4db5667 100644
--- a/rules/base.xml.in
+++ b/rules/base.xml.in
@@ -5096,7 +5096,7 @@
</option>
</group>
<group allowMultipleSelection="false">
- <!-- Let space output nobreakspace for the desired level -->
+ <!-- Let space output NBSP, NNBSP, ZWNJ, and ZWJ for the desired level -->
<configItem>
<name>nbsp</name>
<_description>Using space key to input non-breakable space character</_description>
@@ -5149,6 +5149,54 @@
<_description>Non-breakable space character at fourth level, thin non-breakable space character at sixth level (via Ctrl+Shift)</_description>
</configItem>
</option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj2</name>
+ <_description>Zero-width non-joiner character at second level</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj2zwj3</name>
+ <_description>Zero-width non-joiner character at second level, zero-width joiner character at third level</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj2zwj3nb4</name>
+ <_description>Zero-width non-joiner character at second level, zero-width joiner character at third level, non-breakable space character at fourth level</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj2nb3</name>
+ <_description>Zero-width non-joiner character at second level, non-breakable space character at third level</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj2nb3s</name>
+ <_description>Zero-width non-joiner character at second level, non-breakable space character at third level, nothing at fourth level</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj2nb3zwj4</name>
+ <_description>Zero-width non-joiner character at second level, non-breakable space character at third level, zero-width joiner at fourth level</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj2nb3nnb4</name>
+ <_description>Zero-width non-joiner character at second level, non-breakable space character at third level, thin non-breakable space at fourth level</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>nbsp:zwnj3zwj4</name>
+ <_description>Zero-width non-joiner character at third level, zero-width joiner at fourth level</_description>
+ </configItem>
+ </option>
</group>
<group allowMultipleSelection="true">
<configItem>
diff --git a/symbols/af b/symbols/af
index 3ff8ad4..919f656 100644
--- a/symbols/af
+++ b/symbols/af
@@ -56,7 +56,6 @@ xkb_symbols "basic" {
key <AC11> { [ 0x10006af, Arabic_semicolon, 0x10006ab ] };
key <BKSL> { [ backslash, bar, 0x100003f ] };
- key <SPCE> { [ space, 0x100200c, 0x10000a0 ] };
key <AB01> { [ Arabic_zah, Arabic_kaf, 0x10006d2] };
key <AB02> { [ Arabic_tah, 0x1000653 , 0x1000691 ] };
@@ -68,6 +67,8 @@ xkb_symbols "basic" {
key <AB08> { [ Arabic_waw, greater, 0x100002c ] };
key <AB09> { [ period, less, 0x10006c7 ] };
key <AB10> { [ slash, Arabic_question_mark, 0x10006c9 ] };
+
+ include "nbsp(zwnj2nb3)"
include "level3(ralt_switch)"
};
@@ -126,7 +127,6 @@ xkb_symbols "ps" {
key <AC11> { [ 0x10006ab, Arabic_semicolon, 0x10006af ] };
key <BKSL> { [ backslash, 0x100002a, 0x100007c ] };
- key <SPCE> { [ space, 0x100200c, 0x10000a0 ] };
key <AB01> { [ 0x10006cd, 0x1000638, 0x100003f] };
key <AB02> { [ 0x10006d0, 0x1000637, 0x100003b ] };
@@ -138,6 +138,8 @@ xkb_symbols "ps" {
key <AB08> { [ Arabic_waw, 0x100060c, 0x100002c ] };
key <AB09> { [ 0x1000696, 0x100002e, 0x10006c7 ] };
key <AB10> { [ slash, Arabic_question_mark, 0x10006c9 ] };
+
+ include "nbsp(zwnj2nb3)"
include "level3(ralt_switch)"
};
@@ -196,7 +198,6 @@ xkb_symbols "uz" {
key <AC11> { [ 0x10006af, Arabic_semicolon, 0x10006ab ] };
key <BKSL> { [ backslash, bar, 0x100003f ] };
- key <SPCE> { [ space, 0x100200c, 0x10000a0 ] };
key <AB01> { [ Arabic_zah, 0x10006c9, 0x10006d2] };
key <AB02> { [ Arabic_tah, 0x10006c7, 0x1000691 ] };
@@ -208,6 +209,8 @@ xkb_symbols "uz" {
key <AB08> { [ Arabic_waw, greater, 0x100002c ] };
key <AB09> { [ period, less ] };
key <AB10> { [ slash, Arabic_question_mark, 0x1000655 ] };
+
+ include "nbsp(zwnj2nb3)"
include "level3(ralt_switch)"
};
@@ -256,7 +259,6 @@ xkb_symbols "olpc-ps" {
key <AC11> { [ 0x10006AB, 0x100061B, 0x10006AF ] }; // Arabic kaf with ring, Arabic semicolon, Arabic gaf
key <BKSL> { [ backslash, asterisk, bar ] };
- key <SPCE> { [ space, 0x100200C, 0x10000A0 ] }; // zero width non-joiner, no break space
key <AB01> { [ 0x1000638, 0x1000626, question] }; // Arabic zah, Arabic yeh with hamza above
key <AB02> { [ 0x10006D0, 0x1000637, semicolon ] }; // Arabic tah, Arabic E
@@ -269,6 +271,7 @@ xkb_symbols "olpc-ps" {
key <AB09> { [ 0x1000696, 0x100002E, 0x10006C7 ] }; // Arabic reh with dot below and dot above, full stop, Arabic letter U
key <AB10> { [ slash, 0x100061F, 0x10006C9 ] }; // Arabic question mark, Arabic kirghiz yu
+ include "nbsp(zwnj2nb3)"
include "group(olpc)"
};
@@ -317,7 +320,6 @@ xkb_symbols "olpc-fa" {
key <AC11> { [ 0x10006AF, 0x100061B, 0x10006AB ] }; // Arabic gaf, Arabic semicolon, Arabic kaf with ring
key <BKSL> { [ backslash, bar, question ] };
- key <SPCE> { [ space, 0x100200C, 0x10000A0 ] }; // zero width non-joiner, no break space
key <AB01> { [ 0x1000638, 0x1000643, 0x10006D2 ] }; // Arabic zah, Arabic kaf, Arabic yeh barree
key <AB02> { [ 0x1000637, 0x1000653, 0x1000691 ] }; // Arabic tah, Arabic maddah above, Arabic rreh
@@ -330,6 +332,7 @@ xkb_symbols "olpc-fa" {
key <AB09> { [ period, less, 0x10006C7 ] }; // Arabic u
key <AB10> { [ slash, 0x100061F, 0x10006C9 ] }; // Arabic question mark, Arabic kirghiz yu
+ include "nbsp(zwnj2nb3)"
include "group(olpc)"
};
@@ -378,7 +381,6 @@ xkb_symbols "olpc-uz" {
key <AC11> { [ 0x10006AF, 0x100061B, 0x10006AB ] }; // Arabic gaf, Arabic semicolon, Arabic kaf with ring
key <BKSL> { [ backslash, bar, question ] };
- key <SPCE> { [ space, 0x100200C, 0x10000A0 ] }; // zero width non-joiner, no break space
key <AB01> { [ 0x1000638, 0x10006C9, 0x10006D2 ] }; // Arabic zah, Arabic kirghiz yu, Arabic yeh barree
key <AB02> { [ 0x1000637, 0x10006C7, 0x1000691 ] }; // Arabic tah, Arabic u, Arabic rreh
@@ -391,5 +393,6 @@ xkb_symbols "olpc-uz" {
key <AB09> { [ period, less ] };
key <AB10> { [ slash, 0x100061F, 0x1000655 ] }; // Arabic question mark, Arabic hamza below
+ include "nbsp(zwnj2nb3)"
include "group(olpc)"
};
diff --git a/symbols/in b/symbols/in
index f80abfe..110caac 100644
--- a/symbols/in
+++ b/symbols/in
@@ -85,7 +85,7 @@ xkb_symbols "deva" {
key <AB10> { [ U092f, U095f, slash, question ] };
// space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ):
- key <SPCE> { [ space, space, U200c, U200d ] };
+ include "nbsp(zwnj3zwj4)";
};
//Name : Bolnagri (Combined)
@@ -1261,7 +1261,8 @@ xkb_symbols "olpc" {
key <AB09> { [ period, U0964 ] }; // DEVANAGARI DANDA
key <AB10> { [ U092F, U095F ] }; // DEVANAGARI LETTER YA; DEVANAGARI LETTER YYA
- key <SPCE> { [ space, space, U200C, U200D ] }; // ZERO-WIDTH-NON-JOINER (ZWNJ); ZERO-WIDTH-JOINER (ZWJ)
+ // space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ):
+ include "nbsp(zwnj3zwj4)";
include "group(olpc)"
};
diff --git a/symbols/ir b/symbols/ir
index 85f18b1..a974188 100644
--- a/symbols/ir
+++ b/symbols/ir
@@ -16,19 +16,25 @@
partial default alphanumeric_keys
xkb_symbols "pes" {
- include "ir(pes_part_basic)"
- include "ir(pes_part_ext)"
-
name[Group1]= "Iran";
+
+ include "ir(pes_part_basic)";
+ include "ir(pes_part_ext)";
+
+ include "nbsp(zwnj2nb3nnb4)";
+ include "level3(ralt_switch)";
};
partial alphanumeric_keys
xkb_symbols "pes_keypad" {
- include "ir(pes_part_basic)"
- include "ir(pes_part_keypad)"
-
name[Group1]= "Iran - Persian, with Persian Keypad";
+
+ include "ir(pes_part_basic)";
+ include "ir(pes_part_keypad)";
+
+ include "nbsp(zwnj2nb3nnb4)";
+ include "level3(ralt_switch)";
};
partial hidden alphanumeric_keys
@@ -87,10 +93,6 @@ xkb_symbols "pes_part_basic" {
key <AE11> { [ minus, Arabic_tatweel, underscore ] };
key <AE12> { [ equal, plus, 0x1002212 ] };
key <BKSL> { [ backslash, bar, 0x1002010 ] };
-
- key <SPCE> { [ space, 0x100200c, nobreakspace ] };
-
- include "level3(ralt_switch)"
};
partial hidden alphanumeric_keys
@@ -107,8 +109,6 @@ xkb_symbols "pes_part_ext" {
key <AE08> { [ 0x10006f8, asterisk, enfilledcircbullet, 8 ] };
key <AE09> { [ 0x10006f9, parenright, 0x100200e, 9 ] };
key <AE10> { [ 0x10006f0, parenleft, 0x100200f, 0 ] };
-
- key <SPCE> { [ space, 0x100200c, nobreakspace, 0x100202F ] };
};
partial hidden alphanumeric_keys
@@ -184,7 +184,6 @@ xkb_symbols "ku_ara" {
// Other 3-Level symbols
key <TLDE> { [ 0x100200d, division, asciitilde ] };
key <BKSL> { [ backslash, bar, ccedilla, Ccedilla ] };
- key <SPCE> { [ space, 0x100200c, nobreakspace ] };
// Digits
key <AE01> { [ 1, exclam, 0x10006f1, quoteleft ] };
@@ -236,6 +235,7 @@ xkb_symbols "ku_ara" {
key <AB09> { [ period, less, apostrophe ] };
key <AB10> { [ slash, Arabic_question_mark, question ] };
+ include "nbsp(zwnj2nb3)"
include "level3(ralt_switch)"
};
diff --git a/symbols/lk b/symbols/lk
index 1615186..d07453b 100644
--- a/symbols/lk
+++ b/symbols/lk
@@ -74,7 +74,7 @@ xkb_symbols "sin_phonetic" {
key <AB10> { [ any, any, 0x0100200d, NoSymbol ] };
// Space
- key <SPCE> { [ space, nobreakspace, 0x0100200c, NoSymbol ] };
+ include "nbsp(zwnj2nb3s)";
include "level3(ralt_switch)"
};
diff --git a/symbols/nbsp b/symbols/nbsp
index 1033470..2f273be 100644
--- a/symbols/nbsp
+++ b/symbols/nbsp
@@ -1,7 +1,12 @@
// $XKeyboardConfig$
-//
-// Let space provide nobreakspace for the desired level.
+// Let Space key provide No-Break Space (NBSP), Narrow No-Break Space (NNBSP),
+// Zero-Width Non-Joiner (ZWNJ), and Zero-Width Joiner (ZWJ) for the desired
+// levels.
+
+
+////////////////////////////////////////
+// Only Space
partial
xkb_symbols "none" {
@@ -11,6 +16,10 @@ xkb_symbols "none" {
};
};
+
+////////////////////////////////////////
+// No-Break Space
+
partial
xkb_symbols "level2" {
key <SPCE> {
@@ -42,22 +51,25 @@ xkb_symbols "level3s" {
};
};
-// level3n provides narrow no-breaking space in addition to the normal one
+// for this reason pushing no-breaking spaces to level4 is the safe default nowadays
partial
-xkb_symbols "level3n" {
+xkb_symbols "level4" {
key <SPCE> {
type[Group1]="FOUR_LEVEL",
- symbols[Group1]= [ space, space, nobreakspace, 0x100202F ]
+ symbols[Group1]= [ space, space, space, nobreakspace ]
};
};
-// for this reason pushing no-breaking spaces to level4 is the safe default nowadays
+////////////////////////////////////////
+// Narrow No-Break Space
+
+// level3n provides narrow no-breaking space in addition to the normal one
partial
-xkb_symbols "level4" {
+xkb_symbols "level3n" {
key <SPCE> {
type[Group1]="FOUR_LEVEL",
- symbols[Group1]= [ space, space, space, nobreakspace ]
+ symbols[Group1]= [ space, space, nobreakspace, 0x100202F ]
};
};
@@ -81,3 +93,105 @@ xkb_symbols "level4nl" {
};
};
+
+////////////////////////////////////////
+// Zero-Width Non-Joiner & Zero-Width Joiner
+// Author: Behnam Esfahbod <behnam@esfahbod.info>
+
+// ZWNJ and ZWJ are widely used in Persian, Kurdinsh, Pashto, Uzbek and other
+// languages that use PersoArabic script.
+
+
+// ZWNJ on level 2
+partial
+xkb_symbols "zwnj2" {
+ key <SPCE> {
+ type[Group1]="TWO_LEVEL",
+ symbols[Group1]= [ space, 0x100200c ]
+ };
+};
+
+
+// ZWNJ on level 2
+// ZWJ on level 3
+partial
+xkb_symbols "zwnj2zwj3" {
+ key <SPCE> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1]= [ space, 0x100200c, 0x100200d ]
+ };
+};
+
+
+// ZWNJ on level 2
+// ZWJ on level 3
+// NBSP on level 4
+partial
+xkb_symbols "zwnj2zwj3nb4" {
+ key <SPCE> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1]= [ space, 0x100200c, 0x100200d, nobreakspace ]
+ };
+};
+
+// ZWNJ on level 2
+// NBSP on level 3
+// Used by ir(ku_ara), af(basic), af(ps), af(uz), af(olpc-fa), af(olpc-ps), af(olpc-uz)
+partial
+xkb_symbols "zwnj2nb3" {
+ key <SPCE> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1]= [ space, 0x100200c, nobreakspace ]
+ };
+};
+
+
+// ZWNJ on level 2
+// ZWJ on level 3
+// NBSP on level 4
+// Used by lk(sin_phonetic)
+partial
+xkb_symbols "zwnj2nb3s" {
+ key <SPCE> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1]= [ space, 0x100200c, nobreakspace, NoSymbol ]
+ };
+};
+
+
+// ZWNJ on level 2
+// NBSP on level 3
+// ZWJ on level 4
+partial
+xkb_symbols "zwnj2nb3zwj4" {
+ key <SPCE> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1]= [ space, 0x100200c, nobreakspace, 0x100200d ]
+ };
+};
+
+
+// ZWNJ on level 2
+// NBSP on level 3
+// NNBSP on level 4
+// Used by ir(pes)
+partial
+xkb_symbols "zwnj2nb3nnb4" {
+ key <SPCE> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1]= [ space, 0x100200c, nobreakspace, 0x100202F ]
+ };
+};
+
+
+// ZWNJ on level 3
+// ZWJ on level 4
+// Used by in(deva), in(olpc)
+partial
+xkb_symbols "zwnj3zwj4" {
+ key <SPCE> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1]= [ space, space, 0x100200c, 0x100200d ]
+ };
+};
+
diff --git a/symbols/sy b/symbols/sy
index f9a9f42..6bdba99 100644
--- a/symbols/sy
+++ b/symbols/sy
@@ -54,7 +54,6 @@ xkb_symbols "syc" {
key <AC10> { [ 0x100071F, 0x1000323 ] };
key <AC11> { [ 0x100071B, 0x1000330 ] };
- key <SPCE> { [ space, 0x100200c ] };
key <AB01> { [ bracketright, 0x1000732, Arabic_sukun ] };
key <AB02> { [ bracketleft, 0x1000735 ] };
key <AB03> { [ 0x1000724, 0x1000738, 0x100200D ] };
@@ -68,6 +67,8 @@ xkb_symbols "syc" {
// End Alphanumeric Section
+ // Space
+ include "nbsp(zwnj2)";
// Begin Modifier Mappings