Merge "Small optimization"
diff --git a/java/res/xml-sw600dp/rowkeys_georgian1.xml b/java/res/xml-sw600dp/rowkeys_georgian1.xml
new file mode 100644
index 0000000..86ce6a1
--- /dev/null
+++ b/java/res/xml-sw600dp/rowkeys_georgian1.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+        >
+            <Key
+                latin:keyLabel="Q"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10ED: "ჭ" GEORGIAN LETTER CHAR -->
+            <Key
+                latin:keyLabel="&#x10ED;"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="E"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E6: "ღ" GEORGIAN LETTER GHAN -->
+            <Key
+                latin:keyLabel="&#x10E6;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D7: "თ" GEORGIAN LETTER TAN -->
+            <Key
+                latin:keyLabel="&#x10D7;"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="Y"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="U"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="I"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="O"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="P"
+                latin:keyLabelFlags="preserveCase" />
+        </case>
+        <default>
+            <!-- U+10E5: "ქ" GEORGIAN LETTER GHAN -->
+            <Key
+                latin:keyLabel="&#x10E5;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10EC: "წ" GEORGIAN LETTER CIL -->
+            <Key
+                latin:keyLabel="&#x10EC;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D4: "ე" GEORGIAN LETTER EN
+                 U+10F1: "ჱ" GEORGIAN LETTER HE -->
+            <Key
+                latin:keyLabel="&#x10D4;"
+                latin:moreKeys="&#x10F1;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E0: "რ" GEORGIAN LETTER RAE -->
+            <Key
+                latin:keyLabel="&#x10E0;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E2: "ტ" GEORGIAN LETTER TAR -->
+            <Key
+                latin:keyLabel="&#x10E2;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E7: "ყ" GEORGIAN LETTER QAR
+                 U+10F8: "ჸ" GEORGIAN LETTER ELIFI -->
+            <Key
+                latin:keyLabel="&#x10E7;"
+                latin:moreKeys="&#x10F8;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E3: "უ" GEORGIAN LETTER UN -->
+            <Key
+                latin:keyLabel="&#x10E3;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D8: "ი" GEORGIAN LETTER IN
+                 U+10F2: "ჲ" GEORGIAN LETTER HIE -->
+            <Key
+                latin:keyLabel="&#x10D8;"
+                latin:moreKeys="&#x10F2;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10DD: "ო" GEORGIAN LETTER ON -->
+            <Key
+                latin:keyLabel="&#x10DD;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10DE: "პ" GEORGIAN LETTER PAR -->
+            <Key
+                latin:keyLabel="&#x10DE;"
+                latin:keyLabelFlags="preserveCase" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_greek1.xml b/java/res/xml-sw600dp/rowkeys_greek1.xml
new file mode 100644
index 0000000..cd77b02
--- /dev/null
+++ b/java/res/xml-sw600dp/rowkeys_greek1.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <Key
+        latin:keyLabel=";"
+        latin:keyHintLabel=":"
+        latin:moreKeys=":"
+        latin:keyStyle="hasShiftedLetterHintStyle" />
+    <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
+    <!--
+    <switch>
+        <case
+            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+        >
+            U+0385: "΅" GREEK DIALYTIKA TONOS
+            <Key
+                latin:keyLabel="&#x0385;" />
+        </case>
+        <default>
+        -->
+            <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
+            <Key
+                latin:keyLabel="&#x03C2;"
+                latin:keyLabelFlags="preserveCase" />
+    <!--
+        </default>
+    </switch>
+        -->
+    <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
+         U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
+    <Key
+        latin:keyLabel="&#x03B5;"
+        latin:moreKeys="&#x03AD;" />
+    <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
+    <Key
+        latin:keyLabel="&#x03C1;" />
+    <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
+    <Key
+        latin:keyLabel="&#x03C4;" />
+    <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
+         U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
+         U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+         U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
+    <Key
+        latin:keyLabel="&#x03C5;"
+        latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
+    <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
+    <Key
+        latin:keyLabel="&#x03B8;" />
+    <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
+         U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
+         U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
+         U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
+    <Key
+        latin:keyLabel="&#x03B9;"
+        latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
+    <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
+         U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
+    <Key
+        latin:keyLabel="&#x03BF;"
+        latin:moreKeys="&#x03CC;" />
+    <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
+    <Key
+        latin:keyLabel="&#x03C0;" />
+</merge>
diff --git a/java/res/xml-sw600dp/rows_georgian.xml b/java/res/xml-sw600dp/rows_georgian.xml
index c04df48..fe778e2 100644
--- a/java/res/xml-sw600dp/rows_georgian.xml
+++ b/java/res/xml-sw600dp/rows_georgian.xml
@@ -26,93 +26,8 @@
     <Row
         latin:keyWidth="9.0%p"
     >
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <Key
-                    latin:keyLabel="Q"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10ED: "ჭ" GEORGIAN LETTER CHAR -->
-                <Key
-                    latin:keyLabel="&#x10ED;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="E"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E6: "ღ" GEORGIAN LETTER GHAN -->
-                <Key
-                    latin:keyLabel="&#x10E6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D7: "თ" GEORGIAN LETTER TAN -->
-                <Key
-                    latin:keyLabel="&#x10D7;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="Y"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="U"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="I"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="O"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="P"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10E5: "ქ" GEORGIAN LETTER GHAN -->
-                <Key
-                    latin:keyLabel="&#x10E5;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EC: "წ" GEORGIAN LETTER CIL -->
-                <Key
-                    latin:keyLabel="&#x10EC;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D4: "ე" GEORGIAN LETTER EN
-                     U+10F1: "ჱ" GEORGIAN LETTER HE -->
-                <Key
-                    latin:keyLabel="&#x10D4;"
-                    latin:moreKeys="&#x10F1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E0: "რ" GEORGIAN LETTER RAE -->
-                <Key
-                    latin:keyLabel="&#x10E0;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E2: "ტ" GEORGIAN LETTER TAR -->
-                <Key
-                    latin:keyLabel="&#x10E2;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E7: "ყ" GEORGIAN LETTER QAR
-                     U+10F8: "ჸ" GEORGIAN LETTER ELIFI -->
-                <Key
-                    latin:keyLabel="&#x10E7;"
-                    latin:moreKeys="&#x10F8;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E3: "უ" GEORGIAN LETTER UN -->
-                <Key
-                    latin:keyLabel="&#x10E3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D8: "ი" GEORGIAN LETTER IN
-                     U+10F2: "ჲ" GEORGIAN LETTER HIE -->
-                <Key
-                    latin:keyLabel="&#x10D8;"
-                    latin:moreKeys="&#x10F2;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DD: "ო" GEORGIAN LETTER ON -->
-                <Key
-                    latin:keyLabel="&#x10DD;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DE: "პ" GEORGIAN LETTER PAR -->
-                <Key
-                    latin:keyLabel="&#x10DE;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian1" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyXPos="-10.0%p"
@@ -121,91 +36,9 @@
     <Row
         latin:keyWidth="9.0%p"
     >
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <Key
-                    latin:keyLabel="A"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyXPos="4.5%p" />
-                <!-- U+10E8: "შ" GEORGIAN LETTER SHIN -->
-                <Key
-                    latin:keyLabel="&#x10E8;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="D"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="F"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="G"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="H"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DF: "ჟ" GEORGIAN LETTER ZHAR -->
-                <Key
-                    latin:keyLabel="&#x10DF;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="K"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="L"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10D0: "ა" GEORGIAN LETTER AN
-                     U+10FA: "ჺ" GEORGIAN LETTER AIN -->
-                <Key
-                    latin:keyLabel="&#x10D0;"
-                    latin:moreKeys="&#x10FA;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyXPos="4.5%p" />
-                <!-- U+10E1: "ს" GEORGIAN LETTER SAN -->
-                <Key
-                    latin:keyLabel="&#x10E1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D3: "დ" GEORGIAN LETTER DON -->
-                <Key
-                    latin:keyLabel="&#x10D3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E4: "ფ" GEORGIAN LETTER PHAR
-                     U+10F6: "ჶ" GEORGIAN LETTER FI -->
-                <Key
-                    latin:keyLabel="&#x10E4;"
-                    latin:moreKeys="&#x10F6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D2: "გ" GEORGIAN LETTER GAN
-                     U+10F9: "ჹ" GEORGIAN LETTER TURNED GAN -->
-                <Key
-                    latin:keyLabel="&#x10D2;"
-                    latin:moreKeys="&#x10F9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10F0: "ჰ" GEORGIAN LETTER HAE
-                     U+10F5: "ჵ" GEORGIAN LETTER HOE -->
-                <Key
-                    latin:keyLabel="&#x10F0;"
-                    latin:moreKeys="&#x10F5;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EF: "ჯ" GEORGIAN LETTER JHAN
-                     U+10F7: "ჷ" GEORGIAN LETTER YN -->
-                <Key
-                    latin:keyLabel="&#x10EF;"
-                    latin:moreKeys="&#x10F7;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D9: "კ" GEORGIAN LETTER KAN -->
-                <Key
-                    latin:keyLabel="&#x10D9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DA: "ლ" GEORGIAN LETTER LAS -->
-                <Key
-                    latin:keyLabel="&#x10DA;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian2"
+            latin:keyXPos="4.5%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyXPos="-14.6%p"
@@ -217,71 +50,8 @@
         <Key
             latin:keyStyle="shiftKeyStyle"
             latin:keyWidth="10.0%p" />
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <!-- U+10EB: "ძ" GEORGIAN LETTER JIL -->
-                <Key
-                    latin:keyLabel="&#x10EB;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="X"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E9: "ჩ" GEORGIAN LETTER CHIN -->
-                <Key
-                    latin:keyLabel="&#x10E9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="V"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="B"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="N"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="M"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10D6: "ზ" GEORGIAN LETTER ZEN -->
-                <Key
-                    latin:keyLabel="&#x10D6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EE: "ხ" GEORGIAN LETTER XAN
-                     U+10F4: "ჴ" GEORGIAN LETTER HAR -->
-                <Key
-                    latin:keyLabel="&#x10EE;"
-                    latin:moreKeys="&#x10F4;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EA: "ც" GEORGIAN LETTER CAN -->
-                <Key
-                    latin:keyLabel="&#x10EA;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D5: "ვ" GEORGIAN LETTER VIN
-                     U+10F3: "ჳ" GEORGIAN LETTER WE -->
-                <Key
-                    latin:keyLabel="&#x10D5;"
-                    latin:moreKeys="&#x10F3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D1: "ბ" GEORGIAN LETTER BAN -->
-                <Key
-                    latin:keyLabel="&#x10D1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DC: "ნ" GEORGIAN LETTER NAR
-                     U+10FC: "ჼ" MODIFIER LETTER GEORGIAN NAR -->
-                <Key
-                    latin:keyLabel="&#x10DC;"
-                    latin:moreKeys="&#x10FC;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DB: "მ" GEORGIAN LETTER MAN -->
-                <Key
-                    latin:keyLabel="&#x10DB;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <include
diff --git a/java/res/xml-sw600dp/rows_greek.xml b/java/res/xml-sw600dp/rows_greek.xml
index dab7f90..7c2567c 100644
--- a/java/res/xml-sw600dp/rows_greek.xml
+++ b/java/res/xml-sw600dp/rows_greek.xml
@@ -26,67 +26,8 @@
     <Row
         latin:keyWidth="9.0%p"
     >
-        <Key
-            latin:keyLabel=";"
-            latin:keyHintLabel=":"
-            latin:moreKeys=":"
-            latin:keyStyle="hasShiftedLetterHintStyle" />
-        <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
-        <!--
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                U+0385: "΅" GREEK DIALYTIKA TONOS
-                <Key
-                    latin:keyLabel="&#x0385;" />
-            </case>
-            <default>
-        -->
-                <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
-                <Key
-                    latin:keyLabel="&#x03C2;"
-                    latin:keyLabelFlags="preserveCase" />
-        <!--
-            </default>
-        </switch>
-        -->
-        <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
-             U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B5;"
-            latin:moreKeys="&#x03AD;" />
-        <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
-        <Key
-            latin:keyLabel="&#x03C1;" />
-        <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
-        <Key
-            latin:keyLabel="&#x03C4;" />
-        <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
-             U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
-             U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
-             U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
-        <Key
-            latin:keyLabel="&#x03C5;"
-            latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
-        <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
-        <Key
-            latin:keyLabel="&#x03B8;" />
-        <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
-             U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
-             U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
-             U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
-        <Key
-            latin:keyLabel="&#x03B9;"
-            latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
-        <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
-             U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03BF;"
-            latin:moreKeys="&#x03CC;" />
-        <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
-        <Key
-            latin:keyLabel="&#x03C0;" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek1" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyXPos="-10.0%p"
@@ -95,38 +36,9 @@
     <Row
         latin:keyWidth="9.0%p"
     >
-        <!-- U+03B1: "α" GREEK SMALL LETTER ALPHA
-             U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B1;"
-            latin:moreKeys="&#x03AC;"
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek2"
             latin:keyXPos="4.5%p" />
-        <!-- U+03C3: "σ" GREEK SMALL LETTER SIGMA -->
-        <Key
-            latin:keyLabel="&#x03C3;" />
-        <!-- U+03B4: "δ" GREEK SMALL LETTER DELTA -->
-        <Key
-            latin:keyLabel="&#x03B4;" />
-        <!-- U+03C6: "φ" GREEK SMALL LETTER PHI -->
-        <Key
-            latin:keyLabel="&#x03C6;" />
-        <!-- U+03B3: "γ" GREEK SMALL LETTER GAMMA -->
-        <Key
-            latin:keyLabel="&#x03B3;" />
-        <!-- U+03B7: "η" GREEK SMALL LETTER ETA
-             U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B7;"
-            latin:moreKeys="&#x03AE;" />
-        <!-- U+03BE: "ξ" GREEK SMALL LETTER XI -->
-        <Key
-            latin:keyLabel="&#x03BE;" />
-        <!-- U+03BA: "κ" GREEK SMALL LETTER KAPPA -->
-        <Key
-            latin:keyLabel="&#x03BA;" />
-        <!-- U+03BB: "λ" GREEK SMALL LETTER LAMDA -->
-        <Key
-            latin:keyLabel="&#x03BB;" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyXPos="-14.6%p"
@@ -138,29 +50,8 @@
         <Key
             latin:keyStyle="shiftKeyStyle"
             latin:keyWidth="10.0%p" />
-        <!-- U+03B6: "ζ" GREEK SMALL LETTER ZETA -->
-        <Key
-            latin:keyLabel="&#x03B6;" />
-        <!-- U+03C7: "χ" GREEK SMALL LETTER CHI -->
-        <Key
-            latin:keyLabel="&#x03C7;" />
-        <!-- U+03C8: "ψ" GREEK SMALL LETTER PSI -->
-        <Key
-            latin:keyLabel="&#x03C8;" />
-        <!-- U+03C9: "ω" GREEK SMALL LETTER OMEGA
-             U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03C9;"
-            latin:moreKeys="&#x03CE;" />
-        <!-- U+03B2: "β" GREEK SMALL LETTER BETA -->
-        <Key
-            latin:keyLabel="&#x03B2;" />
-        <!-- U+03BD: "ν" GREEK SMALL LETTER NU -->
-        <Key
-            latin:keyLabel="&#x03BD;" />
-        <!-- U+03BC: "μ" GREEK SMALL LETTER MU -->
-        <Key
-            latin:keyLabel="&#x03BC;" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <include
diff --git a/java/res/xml-sw768dp/rows_georgian.xml b/java/res/xml-sw768dp/rows_georgian.xml
index d991033..d315523 100644
--- a/java/res/xml-sw768dp/rows_georgian.xml
+++ b/java/res/xml-sw768dp/rows_georgian.xml
@@ -30,93 +30,8 @@
             latin:keyStyle="tabKeyStyle"
             latin:keyLabelFlags="alignLeft"
             latin:keyWidth="7.969%p" />
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <Key
-                    latin:keyLabel="Q"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10ED: "ჭ" GEORGIAN LETTER CHAR -->
-                <Key
-                    latin:keyLabel="&#x10ED;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="E"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E6: "ღ" GEORGIAN LETTER GHAN -->
-                <Key
-                    latin:keyLabel="&#x10E6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D7: "თ" GEORGIAN LETTER TAN -->
-                <Key
-                    latin:keyLabel="&#x10D7;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="Y"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="U"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="I"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="O"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="P"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10E5: "ქ" GEORGIAN LETTER GHAN -->
-                <Key
-                    latin:keyLabel="&#x10E5;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EC: "წ" GEORGIAN LETTER CIL -->
-                <Key
-                    latin:keyLabel="&#x10EC;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D4: "ე" GEORGIAN LETTER EN
-                     U+10F1: "ჱ" GEORGIAN LETTER HE -->
-                <Key
-                    latin:keyLabel="&#x10D4;"
-                    latin:moreKeys="&#x10F1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E0: "რ" GEORGIAN LETTER RAE -->
-                <Key
-                    latin:keyLabel="&#x10E0;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E2: "ტ" GEORGIAN LETTER TAR -->
-                <Key
-                    latin:keyLabel="&#x10E2;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E7: "ყ" GEORGIAN LETTER QAR
-                     U+10F8: "ჸ" GEORGIAN LETTER ELIFI -->
-                <Key
-                    latin:keyLabel="&#x10E7;"
-                    latin:moreKeys="&#x10F8;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E3: "უ" GEORGIAN LETTER UN -->
-                <Key
-                    latin:keyLabel="&#x10E3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D8: "ი" GEORGIAN LETTER IN
-                     U+10F2: "ჲ" GEORGIAN LETTER HIE -->
-                <Key
-                    latin:keyLabel="&#x10D8;"
-                    latin:moreKeys="&#x10F2;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DD: "ო" GEORGIAN LETTER ON -->
-                <Key
-                    latin:keyLabel="&#x10DD;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DE: "პ" GEORGIAN LETTER PAR -->
-                <Key
-                    latin:keyLabel="&#x10DE;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian1" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyXPos="-9.219%p"
@@ -129,89 +44,8 @@
             latin:keyStyle="toSymbolKeyStyle"
             latin:keyLabelFlags="alignLeft"
             latin:keyWidth="11.172%p"/>
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <Key
-                    latin:keyLabel="A"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E8: "შ" GEORGIAN LETTER SHIN -->
-                <Key
-                    latin:keyLabel="&#x10E8;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="D"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="F"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="G"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="H"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DF: "ჟ" GEORGIAN LETTER ZHAR -->
-                <Key
-                    latin:keyLabel="&#x10DF;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="K"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="L"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10D0: "ა" GEORGIAN LETTER AN
-                     U+10FA: "ჺ" GEORGIAN LETTER AIN -->
-                <Key
-                    latin:keyLabel="&#x10D0;"
-                    latin:moreKeys="&#x10FA;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E1: "ს" GEORGIAN LETTER SAN -->
-                <Key
-                    latin:keyLabel="&#x10E1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D3: "დ" GEORGIAN LETTER DON -->
-                <Key
-                    latin:keyLabel="&#x10D3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E4: "ფ" GEORGIAN LETTER PHAR
-                     U+10F6: "ჶ" GEORGIAN LETTER FI -->
-                <Key
-                    latin:keyLabel="&#x10E4;"
-                    latin:moreKeys="&#x10F6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D2: "გ" GEORGIAN LETTER GAN
-                     U+10F9: "ჹ" GEORGIAN LETTER TURNED GAN -->
-                <Key
-                    latin:keyLabel="&#x10D2;"
-                    latin:moreKeys="&#x10F9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10F0: "ჰ" GEORGIAN LETTER HAE
-                     U+10F5: "ჵ" GEORGIAN LETTER HOE -->
-                <Key
-                    latin:keyLabel="&#x10F0;"
-                    latin:moreKeys="&#x10F5;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EF: "ჯ" GEORGIAN LETTER JHAN
-                     U+10F7: "ჷ" GEORGIAN LETTER YN -->
-                <Key
-                    latin:keyLabel="&#x10EF;"
-                    latin:moreKeys="&#x10F7;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D9: "კ" GEORGIAN LETTER KAN -->
-                <Key
-                    latin:keyLabel="&#x10D9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DA: "ლ" GEORGIAN LETTER LAS -->
-                <Key
-                    latin:keyLabel="&#x10DA;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyXPos="-15.704%p"
@@ -223,71 +57,8 @@
         <Key
             latin:keyStyle="shiftKeyStyle"
             latin:keyWidth="13.829%p"/>
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <!-- U+10EB: "ძ" GEORGIAN LETTER JIL -->
-                <Key
-                    latin:keyLabel="&#x10EB;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="X"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E9: "ჩ" GEORGIAN LETTER CHIN -->
-                <Key
-                    latin:keyLabel="&#x10E9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="V"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="B"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="N"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="M"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10D6: "ზ" GEORGIAN LETTER ZEN -->
-                <Key
-                    latin:keyLabel="&#x10D6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EE: "ხ" GEORGIAN LETTER XAN
-                     U+10F4: "ჴ" GEORGIAN LETTER HAR -->
-                <Key
-                    latin:keyLabel="&#x10EE;"
-                    latin:moreKeys="&#x10F4;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EA: "ც" GEORGIAN LETTER CAN -->
-                <Key
-                    latin:keyLabel="&#x10EA;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D5: "ვ" GEORGIAN LETTER VIN
-                     U+10F3: "ჳ" GEORGIAN LETTER WE -->
-                <Key
-                    latin:keyLabel="&#x10D5;"
-                    latin:moreKeys="&#x10F3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D1: "ბ" GEORGIAN LETTER BAN -->
-                <Key
-                    latin:keyLabel="&#x10D1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DC: "ნ" GEORGIAN LETTER NAR
-                     U+10FC: "ჼ" MODIFIER LETTER GEORGIAN NAR -->
-                <Key
-                    latin:keyLabel="&#x10DC;"
-                    latin:moreKeys="&#x10FC;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DB: "მ" GEORGIAN LETTER MAN -->
-                <Key
-                    latin:keyLabel="&#x10DB;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
diff --git a/java/res/xml-sw768dp/rows_greek.xml b/java/res/xml-sw768dp/rows_greek.xml
index 7c90724..88e436a 100644
--- a/java/res/xml-sw768dp/rows_greek.xml
+++ b/java/res/xml-sw768dp/rows_greek.xml
@@ -30,71 +30,8 @@
             latin:keyStyle="tabKeyStyle"
             latin:keyLabelFlags="alignLeft"
             latin:keyWidth="7.969%p" />
-        <Key
-            latin:keyLabel=";"
-            latin:keyHintLabel=":"
-            latin:moreKeys=":"
-            latin:keyStyle="hasShiftedLetterHintStyle" />
-        <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
-        <!--
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                U+0385: "΅" GREEK DIALYTIKA TONOS
-                <Key
-                    latin:keyLabel="&#x0385;" />
-            </case>
-            <default>
-        -->
-                <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
-                <Key
-                    latin:keyLabel="&#x03C2;"
-                    latin:keyLabelFlags="preserveCase" />
-        <!--
-            </default>
-        </switch>
-        -->
-        <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
-             U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B5;"
-            latin:moreKeys="&#x03AD;" />
-        <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
-        <Key
-            latin:keyLabel="&#x03C1;" />
-        <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
-        <Key
-            latin:keyLabel="&#x03C4;" />
-        <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
-             U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
-             U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
-             U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
-        <Key
-            latin:keyLabel="&#x03C5;"
-            latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
-        <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
-        <Key
-            latin:keyLabel="&#x03B8;" />
-        <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
-             U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
-             U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
-             U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
-        <Key
-            latin:keyLabel="&#x03B9;"
-            latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
-        <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
-             U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03BF;"
-            latin:moreKeys="&#x03CC;" />
-        <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
-        <Key
-            latin:keyLabel="&#x03C0;" />
-        <Key
-            latin:keyStyle="deleteKeyStyle"
-            latin:keyXPos="-9.219%p"
-            latin:keyWidth="fillBoth" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek1" />
     </Row>
     <Row
         latin:keyWidth="8.125%p"
@@ -103,37 +40,8 @@
             latin:keyStyle="toSymbolKeyStyle"
             latin:keyLabelFlags="alignLeft"
             latin:keyWidth="11.172%p"/>
-        <!-- U+03B1: "α" GREEK SMALL LETTER ALPHA
-             U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B1;"
-            latin:moreKeys="&#x03AC;" />
-        <!-- U+03C3: "σ" GREEK SMALL LETTER SIGMA -->
-        <Key
-            latin:keyLabel="&#x03C3;" />
-        <!-- U+03B4: "δ" GREEK SMALL LETTER DELTA -->
-        <Key
-            latin:keyLabel="&#x03B4;" />
-        <!-- U+03C6: "φ" GREEK SMALL LETTER PHI -->
-        <Key
-            latin:keyLabel="&#x03C6;" />
-        <!-- U+03B3: "γ" GREEK SMALL LETTER GAMMA -->
-        <Key
-            latin:keyLabel="&#x03B3;" />
-        <!-- U+03B7: "η" GREEK SMALL LETTER ETA
-             U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B7;"
-            latin:moreKeys="&#x03AE;" />
-        <!-- U+03BE: "ξ" GREEK SMALL LETTER XI -->
-        <Key
-            latin:keyLabel="&#x03BE;" />
-        <!-- U+03BA: "κ" GREEK SMALL LETTER KAPPA -->
-        <Key
-            latin:keyLabel="&#x03BA;" />
-        <!-- U+03BB: "λ" GREEK SMALL LETTER LAMDA -->
-        <Key
-            latin:keyLabel="&#x03BB;" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyXPos="-15.704%p"
@@ -145,29 +53,8 @@
         <Key
             latin:keyStyle="shiftKeyStyle"
             latin:keyWidth="13.829%p" />
-        <!-- U+03B6: "ζ" GREEK SMALL LETTER ZETA -->
-        <Key
-            latin:keyLabel="&#x03B6;" />
-        <!-- U+03C7: "χ" GREEK SMALL LETTER CHI -->
-        <Key
-            latin:keyLabel="&#x03C7;" />
-        <!-- U+03C8: "ψ" GREEK SMALL LETTER PSI -->
-        <Key
-            latin:keyLabel="&#x03C8;" />
-        <!-- U+03C9: "ω" GREEK SMALL LETTER OMEGA
-             U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03C9;"
-            latin:moreKeys="&#x03CE;" />
-        <!-- U+03B2: "β" GREEK SMALL LETTER BETA -->
-        <Key
-            latin:keyLabel="&#x03B2;" />
-        <!-- U+03BD: "ν" GREEK SMALL LETTER NU -->
-        <Key
-            latin:keyLabel="&#x03BD;" />
-        <!-- U+03BC: "μ" GREEK SMALL LETTER MU -->
-        <Key
-            latin:keyLabel="&#x03BC;" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
diff --git a/java/res/xml/rowkeys_georgian1.xml b/java/res/xml/rowkeys_georgian1.xml
new file mode 100644
index 0000000..b644cdf
--- /dev/null
+++ b/java/res/xml/rowkeys_georgian1.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+        >
+            <Key
+                latin:keyLabel="Q"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="1"
+                latin:additionalMoreKeys="1" />
+            <!-- U+10ED: "ჭ" GEORGIAN LETTER CHAR -->
+            <Key
+                latin:keyLabel="&#x10ED;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="2"
+                latin:additionalMoreKeys="2" />
+            <Key
+                latin:keyLabel="E"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="3"
+                latin:additionalMoreKeys="3" />
+            <!-- U+10E6: "ღ" GEORGIAN LETTER GHAN -->
+            <Key
+                latin:keyLabel="&#x10E6;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="4"
+                latin:additionalMoreKeys="4" />
+            <!-- U+10D7: "თ" GEORGIAN LETTER TAN -->
+            <Key
+                latin:keyLabel="&#x10D7;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="5"
+                latin:additionalMoreKeys="5" />
+            <Key
+                latin:keyLabel="Y"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="6"
+                latin:additionalMoreKeys="6" />
+            <Key
+                latin:keyLabel="U"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="7"
+                latin:additionalMoreKeys="7" />
+            <Key
+                latin:keyLabel="I"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="8"
+                latin:additionalMoreKeys="8" />
+            <Key
+                latin:keyLabel="O"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="9"
+                latin:additionalMoreKeys="9" />
+            <Key
+                latin:keyLabel="P"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="0"
+                latin:additionalMoreKeys="0" />
+        </case>
+        <default>
+            <!-- U+10E5: "ქ" GEORGIAN LETTER GHAN -->
+            <Key
+                latin:keyLabel="&#x10E5;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="1"
+                latin:additionalMoreKeys="1" />
+            <!-- U+10EC: "წ" GEORGIAN LETTER CIL -->
+            <Key
+                latin:keyLabel="&#x10EC;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="2"
+                latin:additionalMoreKeys="2" />
+            <!-- U+10D4: "ე" GEORGIAN LETTER EN
+                 U+10F1: "ჱ" GEORGIAN LETTER HE -->
+            <Key
+                latin:keyLabel="&#x10D4;"
+                latin:moreKeys="&#x10F1;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="3"
+                latin:additionalMoreKeys="3" />
+            <!-- U+10E0: "რ" GEORGIAN LETTER RAE -->
+            <Key
+                latin:keyLabel="&#x10E0;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="4"
+                latin:additionalMoreKeys="4" />
+            <!-- U+10E2: "ტ" GEORGIAN LETTER TAR -->
+            <Key
+                latin:keyLabel="&#x10E2;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="5"
+                latin:additionalMoreKeys="5" />
+            <!-- U+10E7: "ყ" GEORGIAN LETTER QAR
+                 U+10F8: "ჸ" GEORGIAN LETTER ELIFI -->
+            <Key
+                latin:keyLabel="&#x10E7;"
+                latin:moreKeys="&#x10F8;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="6"
+                latin:additionalMoreKeys="6" />
+            <!-- U+10E3: "უ" GEORGIAN LETTER UN -->
+            <Key
+                latin:keyLabel="&#x10E3;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="7"
+                latin:additionalMoreKeys="7" />
+            <!-- U+10D8: "ი" GEORGIAN LETTER IN
+                 U+10F2: "ჲ" GEORGIAN LETTER HIE -->
+            <Key
+                latin:keyLabel="&#x10D8;"
+                latin:moreKeys="&#x10F2;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="8"
+                latin:additionalMoreKeys="8" />
+            <!-- U+10DD: "ო" GEORGIAN LETTER ON -->
+            <Key
+                latin:keyLabel="&#x10DD;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="9"
+                latin:additionalMoreKeys="9" />
+            <!-- U+10DE: "პ" GEORGIAN LETTER PAR -->
+            <Key
+                latin:keyLabel="&#x10DE;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="0"
+                latin:additionalMoreKeys="0" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml/rowkeys_georgian2.xml b/java/res/xml/rowkeys_georgian2.xml
new file mode 100644
index 0000000..ddd375a
--- /dev/null
+++ b/java/res/xml/rowkeys_georgian2.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+        >
+            <Key
+                latin:keyLabel="A"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E8: "შ" GEORGIAN LETTER SHIN -->
+            <Key
+                latin:keyLabel="&#x10E8;"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="D"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="F"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="G"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="H"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10DF: "ჟ" GEORGIAN LETTER ZHAR -->
+            <Key
+                latin:keyLabel="&#x10DF;"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="K"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="L"
+                latin:keyLabelFlags="preserveCase" />
+        </case>
+        <default>
+            <!-- U+10D0: "ა" GEORGIAN LETTER AN
+                 U+10FA: "ჺ" GEORGIAN LETTER AIN -->
+            <Key
+                latin:keyLabel="&#x10D0;"
+                latin:moreKeys="&#x10FA;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E1: "ს" GEORGIAN LETTER SAN -->
+            <Key
+                latin:keyLabel="&#x10E1;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D3: "დ" GEORGIAN LETTER DON -->
+            <Key
+                latin:keyLabel="&#x10D3;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E4: "ფ" GEORGIAN LETTER PHAR
+                 U+10F6: "ჶ" GEORGIAN LETTER FI -->
+            <Key
+                latin:keyLabel="&#x10E4;"
+                latin:moreKeys="&#x10F6;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D2: "გ" GEORGIAN LETTER GAN
+                 U+10F9: "ჹ" GEORGIAN LETTER TURNED GAN -->
+            <Key
+                latin:keyLabel="&#x10D2;"
+                latin:moreKeys="&#x10F9;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10F0: "ჰ" GEORGIAN LETTER HAE
+                 U+10F5: "ჵ" GEORGIAN LETTER HOE -->
+            <Key
+                latin:keyLabel="&#x10F0;"
+                latin:moreKeys="&#x10F5;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10EF: "ჯ" GEORGIAN LETTER JHAN
+                 U+10F7: "ჷ" GEORGIAN LETTER YN -->
+            <Key
+                latin:keyLabel="&#x10EF;"
+                latin:moreKeys="&#x10F7;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D9: "კ" GEORGIAN LETTER KAN -->
+            <Key
+                latin:keyLabel="&#x10D9;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10DA: "ლ" GEORGIAN LETTER LAS -->
+            <Key
+                latin:keyLabel="&#x10DA;"
+                latin:keyLabelFlags="preserveCase" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml/rowkeys_georgian3.xml b/java/res/xml/rowkeys_georgian3.xml
new file mode 100644
index 0000000..ae8443a
--- /dev/null
+++ b/java/res/xml/rowkeys_georgian3.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+        >
+            <!-- U+10EB: "ძ" GEORGIAN LETTER JIL -->
+            <Key
+                latin:keyLabel="&#x10EB;"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="X"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10E9: "ჩ" GEORGIAN LETTER CHIN -->
+            <Key
+                latin:keyLabel="&#x10E9;"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="V"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="B"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="N"
+                latin:keyLabelFlags="preserveCase" />
+            <Key
+                latin:keyLabel="M"
+                latin:keyLabelFlags="preserveCase" />
+        </case>
+        <default>
+            <!-- U+10D6: "ზ" GEORGIAN LETTER ZEN -->
+            <Key
+                latin:keyLabel="&#x10D6;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10EE: "ხ" GEORGIAN LETTER XAN
+                 U+10F4: "ჴ" GEORGIAN LETTER HAR -->
+            <Key
+                latin:keyLabel="&#x10EE;"
+                latin:moreKeys="&#x10F4;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10EA: "ც" GEORGIAN LETTER CAN -->
+            <Key
+                latin:keyLabel="&#x10EA;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D5: "ვ" GEORGIAN LETTER VIN
+                 U+10F3: "ჳ" GEORGIAN LETTER WE -->
+            <Key
+                latin:keyLabel="&#x10D5;"
+                latin:moreKeys="&#x10F3;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10D1: "ბ" GEORGIAN LETTER BAN -->
+            <Key
+                latin:keyLabel="&#x10D1;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10DC: "ნ" GEORGIAN LETTER NAR
+                 U+10FC: "ჼ" MODIFIER LETTER GEORGIAN NAR -->
+            <Key
+                latin:keyLabel="&#x10DC;"
+                latin:moreKeys="&#x10FC;"
+                latin:keyLabelFlags="preserveCase" />
+            <!-- U+10DB: "მ" GEORGIAN LETTER MAN -->
+            <Key
+                latin:keyLabel="&#x10DB;"
+                latin:keyLabelFlags="preserveCase" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml/rowkeys_greek1.xml b/java/res/xml/rowkeys_greek1.xml
new file mode 100644
index 0000000..c0a5cb9
--- /dev/null
+++ b/java/res/xml/rowkeys_greek1.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+        >
+            <Key
+                latin:keyLabel=":"
+                latin:keyHintLabel="1"
+                latin:moreKeys=";"
+                latin:additionalMoreKeys="1" />
+        </case>
+        <default>
+            <Key
+                latin:keyLabel=";"
+                latin:keyHintLabel="1"
+                latin:moreKeys=":"
+                latin:additionalMoreKeys="1" />
+        </default>
+    </switch>
+    <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
+    <!--
+    <switch>
+        <case
+            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+        >
+            U+0385: "΅" GREEK DIALYTIKA TONOS
+            <Key
+                latin:keyLabel="&#x0385;"
+                latin:keyHintLabel="2"
+                latin:additionalMoreKeys="2" />
+        </case>
+        <default>
+        -->
+            <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
+            <Key
+                latin:keyLabel="&#x03C2;"
+                latin:keyLabelFlags="preserveCase"
+                latin:keyHintLabel="2"
+                latin:additionalMoreKeys="2" />
+    <!--
+        </default>
+    </switch>
+        -->
+    <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
+         U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
+    <Key
+        latin:keyLabel="&#x03B5;"
+        latin:keyHintLabel="3"
+        latin:additionalMoreKeys="3"
+        latin:moreKeys="&#x03AD;" />
+    <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
+    <Key
+        latin:keyLabel="&#x03C1;"
+        latin:keyHintLabel="4"
+        latin:additionalMoreKeys="4" />
+    <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
+    <Key
+        latin:keyLabel="&#x03C4;"
+        latin:keyHintLabel="5"
+        latin:additionalMoreKeys="5" />
+    <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
+         U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
+         U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+         U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
+    <Key
+        latin:keyLabel="&#x03C5;"
+        latin:keyHintLabel="6"
+        latin:additionalMoreKeys="6"
+        latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
+    <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
+    <Key
+        latin:keyLabel="&#x03B8;"
+        latin:keyHintLabel="7"
+        latin:additionalMoreKeys="7" />
+    <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
+         U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
+         U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
+         U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
+    <Key
+        latin:keyLabel="&#x03B9;"
+        latin:keyHintLabel="8"
+        latin:additionalMoreKeys="8"
+        latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
+    <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
+         U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
+    <Key
+        latin:keyLabel="&#x03BF;"
+        latin:keyHintLabel="9"
+        latin:additionalMoreKeys="9"
+        latin:moreKeys="&#x03CC;" />
+    <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
+    <Key
+        latin:keyLabel="&#x03C0;"
+        latin:keyHintLabel="0"
+        latin:additionalMoreKeys="0" />
+</merge>
diff --git a/java/res/xml/rowkeys_greek2.xml b/java/res/xml/rowkeys_greek2.xml
new file mode 100644
index 0000000..91bdc11
--- /dev/null
+++ b/java/res/xml/rowkeys_greek2.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <!-- U+03B1: "α" GREEK SMALL LETTER ALPHA
+         U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS -->
+    <Key
+        latin:keyLabel="&#x03B1;"
+        latin:moreKeys="&#x03AC;" />
+    <!-- U+03C3: "σ" GREEK SMALL LETTER SIGMA -->
+    <Key
+        latin:keyLabel="&#x03C3;" />
+    <!-- U+03B4: "δ" GREEK SMALL LETTER DELTA -->
+    <Key
+        latin:keyLabel="&#x03B4;" />
+    <!-- U+03C6: "φ" GREEK SMALL LETTER PHI -->
+    <Key
+        latin:keyLabel="&#x03C6;" />
+    <!-- U+03B3: "γ" GREEK SMALL LETTER GAMMA -->
+    <Key
+        latin:keyLabel="&#x03B3;" />
+    <!-- U+03B7: "η" GREEK SMALL LETTER ETA
+         U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS -->
+    <Key
+        latin:keyLabel="&#x03B7;"
+        latin:moreKeys="&#x03AE;" />
+    <!-- U+03BE: "ξ" GREEK SMALL LETTER XI -->
+    <Key
+        latin:keyLabel="&#x03BE;" />
+    <!-- U+03BA: "κ" GREEK SMALL LETTER KAPPA -->
+    <Key
+        latin:keyLabel="&#x03BA;" />
+    <!-- U+03BB: "λ" GREEK SMALL LETTER LAMDA -->
+    <Key
+        latin:keyLabel="&#x03BB;" />
+</merge>
diff --git a/java/res/xml/rowkeys_greek3.xml b/java/res/xml/rowkeys_greek3.xml
new file mode 100644
index 0000000..8a99db9
--- /dev/null
+++ b/java/res/xml/rowkeys_greek3.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <!-- U+03B6: "ζ" GREEK SMALL LETTER ZETA -->
+    <Key
+        latin:keyLabel="&#x03B6;" />
+    <!-- U+03C7: "χ" GREEK SMALL LETTER CHI -->
+    <Key
+        latin:keyLabel="&#x03C7;" />
+    <!-- U+03C8: "ψ" GREEK SMALL LETTER PSI -->
+    <Key
+        latin:keyLabel="&#x03C8;" />
+    <!-- U+03C9: "ω" GREEK SMALL LETTER OMEGA
+         U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS -->
+    <Key
+        latin:keyLabel="&#x03C9;"
+        latin:moreKeys="&#x03CE;" />
+    <!-- U+03B2: "β" GREEK SMALL LETTER BETA -->
+    <Key
+        latin:keyLabel="&#x03B2;" />
+    <!-- U+03BD: "ν" GREEK SMALL LETTER NU -->
+    <Key
+        latin:keyLabel="&#x03BD;" />
+    <!-- U+03BC: "μ" GREEK SMALL LETTER MU -->
+    <Key
+        latin:keyLabel="&#x03BC;" />
+</merge>
diff --git a/java/res/xml/rows_georgian.xml b/java/res/xml/rows_georgian.xml
index d7d66a3..9bddfc7 100644
--- a/java/res/xml/rows_georgian.xml
+++ b/java/res/xml/rows_georgian.xml
@@ -26,225 +26,15 @@
     <Row
         latin:keyWidth="10%p"
     >
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <Key
-                    latin:keyLabel="Q"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="1"
-                    latin:additionalMoreKeys="1" />
-                <!-- U+10ED: "ჭ" GEORGIAN LETTER CHAR -->
-                <Key
-                    latin:keyLabel="&#x10ED;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="2"
-                    latin:additionalMoreKeys="2" />
-                <Key
-                    latin:keyLabel="E"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="3"
-                    latin:additionalMoreKeys="3" />
-                <!-- U+10E6: "ღ" GEORGIAN LETTER GHAN -->
-                <Key
-                    latin:keyLabel="&#x10E6;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="4"
-                    latin:additionalMoreKeys="4" />
-                <!-- U+10D7: "თ" GEORGIAN LETTER TAN -->
-                <Key
-                    latin:keyLabel="&#x10D7;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="5"
-                    latin:additionalMoreKeys="5" />
-                <Key
-                    latin:keyLabel="Y"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="6"
-                    latin:additionalMoreKeys="6" />
-                <Key
-                    latin:keyLabel="U"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="7"
-                    latin:additionalMoreKeys="7" />
-                <Key
-                    latin:keyLabel="I"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="8"
-                    latin:additionalMoreKeys="8" />
-                <Key
-                    latin:keyLabel="O"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="9"
-                    latin:additionalMoreKeys="9" />
-                <Key
-                    latin:keyLabel="P"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="0"
-                    latin:additionalMoreKeys="0"
-                    latin:keyWidth="fillRight" />
-            </case>
-            <default>
-                <!-- U+10E5: "ქ" GEORGIAN LETTER GHAN -->
-                <Key
-                    latin:keyLabel="&#x10E5;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="1"
-                    latin:additionalMoreKeys="1" />
-                <!-- U+10EC: "წ" GEORGIAN LETTER CIL -->
-                <Key
-                    latin:keyLabel="&#x10EC;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="2"
-                    latin:additionalMoreKeys="2" />
-                <!-- U+10D4: "ე" GEORGIAN LETTER EN
-                     U+10F1: "ჱ" GEORGIAN LETTER HE -->
-                <Key
-                    latin:keyLabel="&#x10D4;"
-                    latin:moreKeys="&#x10F1;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="3"
-                    latin:additionalMoreKeys="3" />
-                <!-- U+10E0: "რ" GEORGIAN LETTER RAE -->
-                <Key
-                    latin:keyLabel="&#x10E0;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="4"
-                    latin:additionalMoreKeys="4" />
-                <!-- U+10E2: "ტ" GEORGIAN LETTER TAR -->
-                <Key
-                    latin:keyLabel="&#x10E2;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="5"
-                    latin:additionalMoreKeys="5" />
-                <!-- U+10E7: "ყ" GEORGIAN LETTER QAR
-                     U+10F8: "ჸ" GEORGIAN LETTER ELIFI -->
-                <Key
-                    latin:keyLabel="&#x10E7;"
-                    latin:moreKeys="&#x10F8;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="6"
-                    latin:additionalMoreKeys="6" />
-                <!-- U+10E3: "უ" GEORGIAN LETTER UN -->
-                <Key
-                    latin:keyLabel="&#x10E3;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="7"
-                    latin:additionalMoreKeys="7" />
-                <!-- U+10D8: "ი" GEORGIAN LETTER IN
-                     U+10F2: "ჲ" GEORGIAN LETTER HIE -->
-                <Key
-                    latin:keyLabel="&#x10D8;"
-                    latin:moreKeys="&#x10F2;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="8"
-                    latin:additionalMoreKeys="8" />
-                <!-- U+10DD: "ო" GEORGIAN LETTER ON -->
-                <Key
-                    latin:keyLabel="&#x10DD;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="9"
-                    latin:additionalMoreKeys="9" />
-                <!-- U+10DE: "პ" GEORGIAN LETTER PAR -->
-                <Key
-                    latin:keyLabel="&#x10DE;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="0"
-                    latin:additionalMoreKeys="0"
-                    latin:keyWidth="fillRight" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian1" />
     </Row>
     <Row
         latin:keyWidth="10%p"
     >
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <Key
-                    latin:keyLabel="A"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyXPos="5%p" />
-                <!-- U+10E8: "შ" GEORGIAN LETTER SHIN -->
-                <Key
-                    latin:keyLabel="&#x10E8;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="D"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="F"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="G"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="H"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DF: "ჟ" GEORGIAN LETTER ZHAR -->
-                <Key
-                    latin:keyLabel="&#x10DF;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="K"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="L"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10D0: "ა" GEORGIAN LETTER AN
-                     U+10FA: "ჺ" GEORGIAN LETTER AIN -->
-                <Key
-                    latin:keyLabel="&#x10D0;"
-                    latin:moreKeys="&#x10FA;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyXPos="5%p" />
-                <!-- U+10E1: "ს" GEORGIAN LETTER SAN -->
-                <Key
-                    latin:keyLabel="&#x10E1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D3: "დ" GEORGIAN LETTER DON -->
-                <Key
-                    latin:keyLabel="&#x10D3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E4: "ფ" GEORGIAN LETTER PHAR
-                     U+10F6: "ჶ" GEORGIAN LETTER FI -->
-                <Key
-                    latin:keyLabel="&#x10E4;"
-                    latin:moreKeys="&#x10F6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D2: "გ" GEORGIAN LETTER GAN
-                     U+10F9: "ჹ" GEORGIAN LETTER TURNED GAN -->
-                <Key
-                    latin:keyLabel="&#x10D2;"
-                    latin:moreKeys="&#x10F9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10F0: "ჰ" GEORGIAN LETTER HAE
-                     U+10F5: "ჵ" GEORGIAN LETTER HOE -->
-                <Key
-                    latin:keyLabel="&#x10F0;"
-                    latin:moreKeys="&#x10F5;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EF: "ჯ" GEORGIAN LETTER JHAN
-                     U+10F7: "ჷ" GEORGIAN LETTER YN -->
-                <Key
-                    latin:keyLabel="&#x10EF;"
-                    latin:moreKeys="&#x10F7;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D9: "კ" GEORGIAN LETTER KAN -->
-                <Key
-                    latin:keyLabel="&#x10D9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DA: "ლ" GEORGIAN LETTER LAS -->
-                <Key
-                    latin:keyLabel="&#x10DA;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
-        <!-- Here is 5%p space -->
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian2"
+            latin:keyXPos="5%p" />
     </Row>
     <Row
         latin:keyWidth="10%p"
@@ -253,71 +43,8 @@
             latin:keyStyle="shiftKeyStyle"
             latin:keyWidth="15%p"
             latin:visualInsetsRight="1%p" />
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <!-- U+10EB: "ძ" GEORGIAN LETTER JIL -->
-                <Key
-                    latin:keyLabel="&#x10EB;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="X"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10E9: "ჩ" GEORGIAN LETTER CHIN -->
-                <Key
-                    latin:keyLabel="&#x10E9;"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="V"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="B"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="N"
-                    latin:keyLabelFlags="preserveCase" />
-                <Key
-                    latin:keyLabel="M"
-                    latin:keyLabelFlags="preserveCase" />
-            </case>
-            <default>
-                <!-- U+10D6: "ზ" GEORGIAN LETTER ZEN -->
-                <Key
-                    latin:keyLabel="&#x10D6;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EE: "ხ" GEORGIAN LETTER XAN
-                     U+10F4: "ჴ" GEORGIAN LETTER HAR -->
-                <Key
-                    latin:keyLabel="&#x10EE;"
-                    latin:moreKeys="&#x10F4;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10EA: "ც" GEORGIAN LETTER CAN -->
-                <Key
-                    latin:keyLabel="&#x10EA;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D5: "ვ" GEORGIAN LETTER VIN
-                     U+10F3: "ჳ" GEORGIAN LETTER WE -->
-                <Key
-                    latin:keyLabel="&#x10D5;"
-                    latin:moreKeys="&#x10F3;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10D1: "ბ" GEORGIAN LETTER BAN -->
-                <Key
-                    latin:keyLabel="&#x10D1;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DC: "ნ" GEORGIAN LETTER NAR
-                     U+10FC: "ჼ" MODIFIER LETTER GEORGIAN NAR -->
-                <Key
-                    latin:keyLabel="&#x10DC;"
-                    latin:moreKeys="&#x10FC;"
-                    latin:keyLabelFlags="preserveCase" />
-                <!-- U+10DB: "მ" GEORGIAN LETTER MAN -->
-                <Key
-                    latin:keyLabel="&#x10DB;"
-                    latin:keyLabelFlags="preserveCase" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/rowkeys_georgian3" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyWidth="fillBoth"
diff --git a/java/res/xml/rows_greek.xml b/java/res/xml/rows_greek.xml
index 24b5c18..e00b927 100644
--- a/java/res/xml/rows_greek.xml
+++ b/java/res/xml/rows_greek.xml
@@ -26,138 +26,15 @@
     <Row
         latin:keyWidth="10%p"
     >
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                <Key
-                    latin:keyLabel=":"
-                    latin:keyHintLabel="1"
-                    latin:moreKeys=";"
-                    latin:additionalMoreKeys="1" />
-            </case>
-            <default>
-                <Key
-                    latin:keyLabel=";"
-                    latin:keyHintLabel="1"
-                    latin:moreKeys=":"
-                    latin:additionalMoreKeys="1" />
-            </default>
-        </switch>
-        <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
-        <!--
-        <switch>
-            <case
-                latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
-            >
-                U+0385: "΅" GREEK DIALYTIKA TONOS
-                <Key
-                    latin:keyLabel="&#x0385;"
-                    latin:keyHintLabel="2"
-                    latin:additionalMoreKeys="2" />
-            </case>
-            <default>
-        -->
-                <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
-                <Key
-                    latin:keyLabel="&#x03C2;"
-                    latin:keyLabelFlags="preserveCase"
-                    latin:keyHintLabel="2"
-                    latin:additionalMoreKeys="2" />
-        <!--
-            </default>
-        </switch>
-        -->
-        <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
-             U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B5;"
-            latin:keyHintLabel="3"
-            latin:additionalMoreKeys="3"
-            latin:moreKeys="&#x03AD;" />
-        <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
-        <Key
-            latin:keyLabel="&#x03C1;"
-            latin:keyHintLabel="4"
-            latin:additionalMoreKeys="4" />
-        <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
-        <Key
-            latin:keyLabel="&#x03C4;"
-            latin:keyHintLabel="5"
-            latin:additionalMoreKeys="5" />
-        <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
-             U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
-             U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
-             U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
-        <Key
-            latin:keyLabel="&#x03C5;"
-            latin:keyHintLabel="6"
-            latin:additionalMoreKeys="6"
-            latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
-        <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
-        <Key
-            latin:keyLabel="&#x03B8;"
-            latin:keyHintLabel="7"
-            latin:additionalMoreKeys="7" />
-        <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
-             U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
-             U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
-             U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
-        <Key
-            latin:keyLabel="&#x03B9;"
-            latin:keyHintLabel="8"
-            latin:additionalMoreKeys="8"
-            latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
-        <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
-             U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03BF;"
-            latin:keyHintLabel="9"
-            latin:additionalMoreKeys="9"
-            latin:moreKeys="&#x03CC;" />
-        <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
-        <Key
-            latin:keyLabel="&#x03C0;"
-            latin:keyHintLabel="0"
-            latin:additionalMoreKeys="0"
-            latin:keyWidth="fillRight" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek1" />
     </Row>
     <Row
         latin:keyWidth="10%p"
     >
-        <!-- U+03B1: "α" GREEK SMALL LETTER ALPHA
-             U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B1;"
-            latin:moreKeys="&#x03AC;"
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek2"
             latin:keyXPos="5%p" />
-        <!-- U+03C3: "σ" GREEK SMALL LETTER SIGMA -->
-        <Key
-            latin:keyLabel="&#x03C3;" />
-        <!-- U+03B4: "δ" GREEK SMALL LETTER DELTA -->
-        <Key
-            latin:keyLabel="&#x03B4;" />
-        <!-- U+03C6: "φ" GREEK SMALL LETTER PHI -->
-        <Key
-            latin:keyLabel="&#x03C6;" />
-        <!-- U+03B3: "γ" GREEK SMALL LETTER GAMMA -->
-        <Key
-            latin:keyLabel="&#x03B3;" />
-        <!-- U+03B7: "η" GREEK SMALL LETTER ETA
-             U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03B7;"
-            latin:moreKeys="&#x03AE;" />
-        <!-- U+03BE: "ξ" GREEK SMALL LETTER XI -->
-        <Key
-            latin:keyLabel="&#x03BE;" />
-        <!-- U+03BA: "κ" GREEK SMALL LETTER KAPPA -->
-        <Key
-            latin:keyLabel="&#x03BA;" />
-        <!-- U+03BB: "λ" GREEK SMALL LETTER LAMDA -->
-        <Key
-            latin:keyLabel="&#x03BB;" />
-        <!-- Here is 5%p space -->
     </Row>
     <Row
         latin:keyWidth="10%p"
@@ -166,34 +43,13 @@
             latin:keyStyle="shiftKeyStyle"
             latin:keyWidth="15%p"
             latin:visualInsetsRight="1%p" />
-        <!-- U+03B6: "ζ" GREEK SMALL LETTER ZETA -->
-        <Key
-            latin:keyLabel="&#x03B6;" />
-        <!-- U+03C7: "χ" GREEK SMALL LETTER CHI -->
-        <Key
-            latin:keyLabel="&#x03C7;" />
-        <!-- U+03C8: "ψ" GREEK SMALL LETTER PSI -->
-        <Key
-            latin:keyLabel="&#x03C8;" />
-        <!-- U+03C9: "ω" GREEK SMALL LETTER OMEGA
-             U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS -->
-        <Key
-            latin:keyLabel="&#x03C9;"
-            latin:moreKeys="&#x03CE;" />
-        <!-- U+03B2: "β" GREEK SMALL LETTER BETA -->
-        <Key
-            latin:keyLabel="&#x03B2;" />
-        <!-- U+03BD: "ν" GREEK SMALL LETTER NU -->
-        <Key
-            latin:keyLabel="&#x03BD;" />
-        <!-- U+03BC: "μ" GREEK SMALL LETTER MU -->
-        <Key
-            latin:keyLabel="&#x03BC;" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_greek3" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyWidth="fillRight"
             latin:visualInsetsLeft="1%p" />
     </Row>
-   <include
+    <include
         latin:keyboardLayout="@xml/row_qwerty4" />
 </merge>