Update xlarge drawable of Keyboard

Bug: 3109804
Change-Id: I316f9cfcec377a7d0ea1417e1e3cea55cbdb9e2b
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_holo.9.png
new file mode 100644
index 0000000..c23ff18
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_off_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_off_holo.9.png
new file mode 100644
index 0000000..e29de9a
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_off_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_on_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_on_holo.9.png
new file mode 100644
index 0000000..d46c03a
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_dark_normal_on_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_holo.9.png
new file mode 100644
index 0000000..45ca3a7
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_off_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_off_holo.9.png
new file mode 100644
index 0000000..da039f3
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_off_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_on_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_on_holo.9.png
new file mode 100644
index 0000000..315ab17
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_dark_pressed_on_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_gingerbread.xml b/java/res/drawable-xlarge/btn_keyboard_key_gingerbread.xml
new file mode 100644
index 0000000..3dab843
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_gingerbread.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!-- TODO: Remove "gingerbread" from file name and rename this to "btn_keyboard_key.xml". -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <!-- Functional keys. -->
+
+    <item android:state_single="true" android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_dark_pressed_holo" />
+    <item android:state_single="true"
+          android:drawable="@drawable/btn_keyboard_key_dark_normal_holo" />
+
+    <!-- Toggle keys. Use checkable/checked state. -->
+
+    <item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_dark_pressed_on_holo" />
+    <item android:state_checkable="true" android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_dark_pressed_off_holo" />
+    <item android:state_checkable="true" android:state_checked="true"
+          android:drawable="@drawable/btn_keyboard_key_dark_normal_on_holo" />
+    <item android:state_checkable="true"
+          android:drawable="@drawable/btn_keyboard_key_dark_normal_off_holo" />
+
+    <!-- Normal keys -->
+
+    <item android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_light_pressed_holo" />
+    <item android:drawable="@drawable/btn_keyboard_key_light_normal_holo" />
+</selector>
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_light_normal_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_light_normal_holo.9.png
new file mode 100644
index 0000000..a1c80a2
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_light_normal_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/btn_keyboard_key_light_pressed_holo.9.png b/java/res/drawable-xlarge/btn_keyboard_key_light_pressed_holo.9.png
new file mode 100644
index 0000000..90babfc
--- /dev/null
+++ b/java/res/drawable-xlarge/btn_keyboard_key_light_pressed_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_0_holo.9.png b/java/res/drawable-xlarge/key_hint_0_holo.9.png
new file mode 100644
index 0000000..33b6b40
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_0_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_1_holo.9.png b/java/res/drawable-xlarge/key_hint_1_holo.9.png
new file mode 100644
index 0000000..df47e7b
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_1_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_2_holo.9.png b/java/res/drawable-xlarge/key_hint_2_holo.9.png
new file mode 100644
index 0000000..bea76f3
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_2_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_3_holo.9.png b/java/res/drawable-xlarge/key_hint_3_holo.9.png
new file mode 100644
index 0000000..8f8f89d
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_3_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_4_holo.9.png b/java/res/drawable-xlarge/key_hint_4_holo.9.png
new file mode 100644
index 0000000..feaa88a
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_4_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_5_holo.9.png b/java/res/drawable-xlarge/key_hint_5_holo.9.png
new file mode 100644
index 0000000..b3635e0
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_5_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_6_holo.9.png b/java/res/drawable-xlarge/key_hint_6_holo.9.png
new file mode 100644
index 0000000..1345980
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_6_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_7_holo.9.png b/java/res/drawable-xlarge/key_hint_7_holo.9.png
new file mode 100644
index 0000000..4373010
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_7_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_8_holo.9.png b/java/res/drawable-xlarge/key_hint_8_holo.9.png
new file mode 100644
index 0000000..1bde6d1
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_8_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_9_holo.9.png b/java/res/drawable-xlarge/key_hint_9_holo.9.png
new file mode 100644
index 0000000..61d6f55
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_9_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_at_holo.9.png b/java/res/drawable-xlarge/key_hint_at_holo.9.png
new file mode 100644
index 0000000..f422a84
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_at_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_colon_holo.9.png b/java/res/drawable-xlarge/key_hint_colon_holo.9.png
new file mode 100644
index 0000000..7c769bd
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_colon_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_comma_holo.9.png b/java/res/drawable-xlarge/key_hint_comma_holo.9.png
new file mode 100644
index 0000000..a9689ad
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_comma_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_dash_holo.9.png b/java/res/drawable-xlarge/key_hint_dash_holo.9.png
new file mode 100644
index 0000000..2402994
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_dash_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_equal_holo.9.png b/java/res/drawable-xlarge/key_hint_equal_holo.9.png
new file mode 100644
index 0000000..89e5084
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_equal_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_exclamation_holo.9.png b/java/res/drawable-xlarge/key_hint_exclamation_holo.9.png
new file mode 100644
index 0000000..f349538
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_exclamation_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_larger_holo.9.png b/java/res/drawable-xlarge/key_hint_larger_holo.9.png
new file mode 100644
index 0000000..2d73436
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_larger_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_parenclose_holo.9.png b/java/res/drawable-xlarge/key_hint_parenclose_holo.9.png
new file mode 100644
index 0000000..48f9f80
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_parenclose_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_parenopen_holo.9.png b/java/res/drawable-xlarge/key_hint_parenopen_holo.9.png
new file mode 100644
index 0000000..f05ae20
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_parenopen_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_period_holo.9.png b/java/res/drawable-xlarge/key_hint_period_holo.9.png
new file mode 100644
index 0000000..ec330fb
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_period_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_plus_holo.9.png b/java/res/drawable-xlarge/key_hint_plus_holo.9.png
new file mode 100644
index 0000000..770bf5d
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_plus_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_question_holo.9.png b/java/res/drawable-xlarge/key_hint_question_holo.9.png
new file mode 100644
index 0000000..f24bb1c
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_question_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_quote_holo.9.png b/java/res/drawable-xlarge/key_hint_quote_holo.9.png
new file mode 100644
index 0000000..ceee67d
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_quote_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_semicolon_holo.9.png b/java/res/drawable-xlarge/key_hint_semicolon_holo.9.png
new file mode 100644
index 0000000..e8d6b02
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_semicolon_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_simplequote_holo.9.png b/java/res/drawable-xlarge/key_hint_simplequote_holo.9.png
new file mode 100644
index 0000000..7cafbb0
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_simplequote_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_slash_holo.9.png b/java/res/drawable-xlarge/key_hint_slash_holo.9.png
new file mode 100644
index 0000000..676d566
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_slash_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_smaller_holo.9.png b/java/res/drawable-xlarge/key_hint_smaller_holo.9.png
new file mode 100644
index 0000000..97cf26e
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_smaller_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_star_holo.9.png b/java/res/drawable-xlarge/key_hint_star_holo.9.png
new file mode 100644
index 0000000..b10aa89
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_star_holo.9.png
Binary files differ
diff --git a/java/res/drawable-xlarge/key_hint_underline_holo.9.png b/java/res/drawable-xlarge/key_hint_underline_holo.9.png
new file mode 100644
index 0000000..38abfcb
--- /dev/null
+++ b/java/res/drawable-xlarge/key_hint_underline_holo.9.png
Binary files differ
diff --git a/java/res/values-xlarge/dimens.xml b/java/res/values-xlarge/dimens.xml
index d2cd6c7..4614f72 100644
--- a/java/res/values-xlarge/dimens.xml
+++ b/java/res/values-xlarge/dimens.xml
@@ -21,7 +21,8 @@
 <resources>
     <!-- key_height + key_bottom_gap = popup_key_height -->
     <dimen name="key_height">0.450in</dimen>
-    <dimen name="key_bottom_gap">0.0in</dimen>
+    <dimen name="key_bottom_gap">0.03in</dimen>
+    <dimen name="key_horizontal_gap">0.03in</dimen>
     <dimen name="popup_key_height">0.450in</dimen>
     <dimen name="keyboard_bottom_padding">0.10in</dimen>
     <!-- key_height x 1.6 -->
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
index 2fa47ae..765262d 100644
--- a/java/res/values/dimens.xml
+++ b/java/res/values/dimens.xml
@@ -22,6 +22,7 @@
     <!-- key_height + key_bottom_gap = popup_key_height -->
     <dimen name="key_height">0.290in</dimen>
     <dimen name="key_bottom_gap">0.035in</dimen>
+    <dimen name="key_horizontal_gap">0.000in</dimen>
     <dimen name="popup_key_height">0.325in</dimen>
     <dimen name="keyboard_bottom_padding">0.06in</dimen>
     <!-- key_height x 1.6 -->
diff --git a/java/res/xml-da/kbd_qwerty.xml b/java/res/xml-da/kbd_qwerty.xml
index 66771c2..f1f9904 100644
--- a/java/res/xml-da/kbd_qwerty.xml
+++ b/java/res/xml-da/kbd_qwerty.xml
@@ -27,7 +27,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-da/kbd_qwerty_black.xml b/java/res/xml-da/kbd_qwerty_black.xml
index d89204a..b7ebc66 100644
--- a/java/res/xml-da/kbd_qwerty_black.xml
+++ b/java/res/xml-da/kbd_qwerty_black.xml
@@ -27,7 +27,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-de/kbd_qwerty.xml b/java/res/xml-de/kbd_qwerty.xml
index 30d8de0..0832cbc 100644
--- a/java/res/xml-de/kbd_qwerty.xml
+++ b/java/res/xml-de/kbd_qwerty.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
@@ -82,11 +82,12 @@
             latin:keyEdgeFlags="right" />
     </Row>
     <Row>
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="a"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_a"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="s"
diff --git a/java/res/xml-de/kbd_qwerty_black.xml b/java/res/xml-de/kbd_qwerty_black.xml
index f394c8d..13a7dcb 100644
--- a/java/res/xml-de/kbd_qwerty_black.xml
+++ b/java/res/xml-de/kbd_qwerty_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
@@ -82,11 +82,12 @@
             latin:keyEdgeFlags="right" />
     </Row>
     <Row>
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="a"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_a"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="s"
diff --git a/java/res/xml-fr/kbd_qwerty.xml b/java/res/xml-fr/kbd_qwerty.xml
index 9a4a879..95c1073 100644
--- a/java/res/xml-fr/kbd_qwerty.xml
+++ b/java/res/xml-fr/kbd_qwerty.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-fr/kbd_qwerty_black.xml b/java/res/xml-fr/kbd_qwerty_black.xml
index be2befb..b46ce9c 100644
--- a/java/res/xml-fr/kbd_qwerty_black.xml
+++ b/java/res/xml-fr/kbd_qwerty_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-iw/kbd_qwerty.xml b/java/res/xml-iw/kbd_qwerty.xml
index 7f66eef..fd94a12 100644
--- a/java/res/xml-iw/kbd_qwerty.xml
+++ b/java/res/xml-iw/kbd_qwerty.xml
@@ -21,16 +21,17 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
     <Row
         latin:rowEdgeFlags="top"
     >
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="ק"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="ר" />
@@ -46,13 +47,14 @@
             latin:keyLabel="ם" />
         <Key
             latin:keyLabel="פ" />
+        <Spacer
+            latin:horizontalGap="1.25%p" />
         <Key
             latin:codes="@integer/key_delete"
             latin:keyIcon="@drawable/sym_keyboard_delete"
             latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
             latin:keyWidth="13.75%p"
             latin:isModifier="true"
-            latin:horizontalGap="1.25%p"
             latin:isRepeatable="true"
             latin:keyEdgeFlags="right" />
     </Row>
@@ -81,9 +83,10 @@
             latin:keyEdgeFlags="right" />
     </Row>
     <Row>
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="ז"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="ס" />
diff --git a/java/res/xml-iw/kbd_qwerty_black.xml b/java/res/xml-iw/kbd_qwerty_black.xml
index 80ade20..1c1c1e3 100644
--- a/java/res/xml-iw/kbd_qwerty_black.xml
+++ b/java/res/xml-iw/kbd_qwerty_black.xml
@@ -21,16 +21,17 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
     <Row
         latin:rowEdgeFlags="top"
     >
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="ק"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="ר" />
@@ -46,12 +47,13 @@
             latin:keyLabel="ם" />
         <Key
             latin:keyLabel="פ" />
+        <Spacer
+            latin:horizontalGap="1.25%p" />
         <Key
             latin:codes="@integer/key_delete"
             latin:keyIcon="@drawable/sym_bkeyboard_delete"
             latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
             latin:keyWidth="13.75%p"
-            latin:horizontalGap="1.25%p"
             latin:isRepeatable="true"
             latin:keyEdgeFlags="right" />
     </Row>
@@ -80,9 +82,10 @@
             latin:keyEdgeFlags="right" />
     </Row>
     <Row>
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="ז"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="ס" />
diff --git a/java/res/xml-nb/kbd_qwerty.xml b/java/res/xml-nb/kbd_qwerty.xml
index 96a86b0..32512da 100644
--- a/java/res/xml-nb/kbd_qwerty.xml
+++ b/java/res/xml-nb/kbd_qwerty.xml
@@ -27,7 +27,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-nb/kbd_qwerty_black.xml b/java/res/xml-nb/kbd_qwerty_black.xml
index 4adeb48..982a3de 100644
--- a/java/res/xml-nb/kbd_qwerty_black.xml
+++ b/java/res/xml-nb/kbd_qwerty_black.xml
@@ -27,7 +27,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-ru/kbd_qwerty.xml b/java/res/xml-ru/kbd_qwerty.xml
index 57114a8..80a9ddd 100644
--- a/java/res/xml-ru/kbd_qwerty.xml
+++ b/java/res/xml-ru/kbd_qwerty.xml
@@ -20,8 +20,8 @@
 
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
-    latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:keyWidth="9.091%p"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-ru/kbd_qwerty_black.xml b/java/res/xml-ru/kbd_qwerty_black.xml
index 8f2f599..2635541 100644
--- a/java/res/xml-ru/kbd_qwerty_black.xml
+++ b/java/res/xml-ru/kbd_qwerty_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-sr/kbd_qwerty.xml b/java/res/xml-sr/kbd_qwerty.xml
index 1a65705..c9a4e44 100644
--- a/java/res/xml-sr/kbd_qwerty.xml
+++ b/java/res/xml-sr/kbd_qwerty.xml
@@ -22,7 +22,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-sr/kbd_qwerty_black.xml b/java/res/xml-sr/kbd_qwerty_black.xml
index e4b09c7..f760c5e 100644
--- a/java/res/xml-sr/kbd_qwerty_black.xml
+++ b/java/res/xml-sr/kbd_qwerty_black.xml
@@ -22,7 +22,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-sv/kbd_qwerty.xml b/java/res/xml-sv/kbd_qwerty.xml
index 8819159..ae70024 100644
--- a/java/res/xml-sv/kbd_qwerty.xml
+++ b/java/res/xml-sv/kbd_qwerty.xml
@@ -29,7 +29,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-sv/kbd_qwerty_black.xml b/java/res/xml-sv/kbd_qwerty_black.xml
index 2532fca..463b60b 100644
--- a/java/res/xml-sv/kbd_qwerty_black.xml
+++ b/java/res/xml-sv/kbd_qwerty_black.xml
@@ -29,7 +29,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="9.09%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml-xlarge/kbd_phone.xml b/java/res/xml-xlarge/kbd_phone.xml
index 977bbf2..107731f 100644
--- a/java/res/xml-xlarge/kbd_phone.xml
+++ b/java/res/xml-xlarge/kbd_phone.xml
@@ -21,8 +21,8 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="7.5%p"
-    latin:horizontalGap="0px"
-    latin:verticalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
+    latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
     <!-- This row is intentionally not marked as a top row -->
@@ -35,29 +35,35 @@
             latin:keyEdgeFlags="left" />
         <!-- To match one character label size with "Tab", I placed spaces around the char '-'
              and '+'. -->
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="45"
-            latin:keyLabel=" - "
-            latin:horizontalGap="6.0%p" />
+            latin:keyLabel=" - " />
         <Key
             latin:codes="43"
             latin:keyLabel=" + " />
+        <Spacer
+            latin:horizontalGap="11.5%p" />
         <Key
             latin:codes="49"
             latin:keyIcon="@drawable/sym_keyboard_num1"
-            latin:horizontalGap="11.5%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="50"
-            latin:keyIcon="@drawable/sym_keyboard_num2" />
+            latin:keyIcon="@drawable/sym_keyboard_num2"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="51"
-            latin:keyIcon="@drawable/sym_keyboard_num3" />
+            latin:keyIcon="@drawable/sym_keyboard_num3"
+            latin:keyWidth="10.5%p " />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="@integer/key_delete"
             latin:keyIcon="@drawable/sym_keyboard_delete"
             latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
             latin:keyWidth="15.0%p"
-            latin:horizontalGap="6.0%p"
             latin:isModifier="true"
             latin:isRepeatable="true"
             latin:keyEdgeFlags="right" />
@@ -72,29 +78,35 @@
             latin:keyEdgeFlags="left" />
         <!-- To match one character label size with "More", I placed spaces around the char ','
              and '.'. -->
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="44"
-            latin:keyLabel=" , "
-            latin:horizontalGap="6.0%p" />
+            latin:keyLabel=" , " />
         <Key
             latin:codes="46"
             latin:keyLabel=" . " />
+        <Spacer
+            latin:horizontalGap="11.5%p" />
         <Key
             latin:codes="52"
             latin:keyIcon="@drawable/sym_keyboard_num4"
-            latin:horizontalGap="11.5%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="53"
-            latin:keyIcon="@drawable/sym_keyboard_num5" />
+            latin:keyIcon="@drawable/sym_keyboard_num5"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="54"
-            latin:keyIcon="@drawable/sym_keyboard_num6" />
+            latin:keyIcon="@drawable/sym_keyboard_num6"
+            latin:keyWidth="10.5%p " />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="@integer/key_return"
             latin:keyIcon="@drawable/sym_keyboard_return"
             latin:iconPreview="@drawable/sym_keyboard_feedback_return"
             latin:keyWidth="15.0%p"
-            latin:horizontalGap="6.0%p"
             latin:isModifier="true"
             latin:keyEdgeFlags="right" />
     </Row>
@@ -103,47 +115,57 @@
              and ')'. -->
         <!-- There is an empty area bellow the "More" key and left of the "(" key.  To ignore
              the touch event on the area, "(" is intentionally not marked as a left edge key. -->
+        <Spacer
+            latin:horizontalGap="21.0%p" />
         <Key
             latin:codes="40"
-            latin:keyLabel=" ( "
-            latin:horizontalGap="21.0%p" />
+            latin:keyLabel=" ( " />
         <Key
             latin:codes="41"
             latin:keyLabel=" ) " />
+        <Spacer
+            latin:horizontalGap="11.5%p" />
         <Key
             latin:codes="55"
             latin:keyIcon="@drawable/sym_keyboard_num7"
-            latin:horizontalGap="11.5%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="56"
-            latin:keyIcon="@drawable/sym_keyboard_num8" />
-        <!-- There is an empty area bellow the "Enter" key and right of the "9" key.  To ignore
-             the touch event on the area, "9" is intentionally not marked as a right edge key. -->
+            latin:keyIcon="@drawable/sym_keyboard_num8"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="57"
-            latin:keyIcon="@drawable/sym_keyboard_num9" />
-    </Row>
+            latin:keyIcon="@drawable/sym_keyboard_num9"
+            latin:keyWidth="10.5%p " />
+        <!-- There is an empty area bellow the "Enter" key and right of the "9" key.  To ignore
+             the touch event on the area, "9" is intentionally not marked as a right edge key. -->
+        </Row>
     <!-- This row is intentionally not marked as a bottom row -->
     <Row>
         <!-- There is an empty area bellow the "More" key and left of the "space" key.  To ignore
              the touch event on the area, "space" is intentionally not marked as a left edge key. -->
+        <Spacer
+            latin:horizontalGap="21.0%p" />
         <Key
             latin:codes="@integer/key_space"
             latin:keyIcon="@drawable/sym_keyboard_space"
             latin:iconPreview="@drawable/sym_keyboard_feedback_space"
-            latin:keyWidth="15.0%p"
-            latin:horizontalGap="21.0%p " />
+            latin:keyWidth="15.0%p" />
+        <Spacer
+            latin:horizontalGap="11.5%p" />
         <Key
             latin:codes="42"
             latin:keyIcon="@drawable/sym_keyboard_numstar"
-            latin:horizontalGap="11.5%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="48"
-            latin:keyIcon="@drawable/sym_keyboard_num0" />
-        <!-- There is an empty area bellow the "Enter" key and right of the "#" key.  To ignore
-             the touch event on the area, "#" is intentionally not marked as a right edge key. -->
+            latin:keyIcon="@drawable/sym_keyboard_num0"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="35"
-            latin:keyIcon="@drawable/sym_keyboard_numpound" />
+            latin:keyIcon="@drawable/sym_keyboard_numpound"
+            latin:keyWidth="10.5%p " />
+        <!-- There is an empty area bellow the "Enter" key and right of the "#" key.  To ignore
+             the touch event on the area, "#" is intentionally not marked as a right edge key. -->
     </Row>
 </Keyboard>
diff --git a/java/res/xml-xlarge/kbd_phone_symbols.xml b/java/res/xml-xlarge/kbd_phone_symbols.xml
index 6fbf3a9..a7dcd32 100644
--- a/java/res/xml-xlarge/kbd_phone_symbols.xml
+++ b/java/res/xml-xlarge/kbd_phone_symbols.xml
@@ -21,8 +21,8 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="7.5%p"
-    latin:horizontalGap="0px"
-    latin:verticalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
+    latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
     <!-- This row is intentionally not marked as a top row -->
@@ -33,10 +33,11 @@
             latin:keyWidth="15.0%p"
             latin:isModifier="true"
             latin:keyEdgeFlags="left" />
+        <Spacer
+            latin:horizontalGap="4.0%p" />
         <Key
             latin:codes="44"
-            latin:keyLabel="@string/label_pause_key"
-            latin:horizontalGap="4.0%p" />
+            latin:keyLabel="@string/label_pause_key" />
         <!-- To match one character label size with "Tab" and "Pause, I placed spaces around the
              char '-' and '+'. -->
         <Key
@@ -45,22 +46,27 @@
         <Key
             latin:codes="43"
             latin:keyLabel=" + " />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="49"
             latin:keyIcon="@drawable/sym_keyboard_num1"
-            latin:horizontalGap="6.0%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="50"
-            latin:keyIcon="@drawable/sym_keyboard_num2" />
+            latin:keyIcon="@drawable/sym_keyboard_num2"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="51"
-            latin:keyIcon="@drawable/sym_keyboard_num3" />
+            latin:keyIcon="@drawable/sym_keyboard_num3"
+            latin:keyWidth="10.5%p " />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="@integer/key_delete"
             latin:keyIcon="@drawable/sym_keyboard_delete"
             latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
             latin:keyWidth="15.0%p"
-            latin:horizontalGap="6.0%p"
             latin:isModifier="true"
             latin:isRepeatable="true"
             latin:keyEdgeFlags="right" />
@@ -73,10 +79,11 @@
             latin:isModifier="true"
             latin:isSticky="true"
             latin:keyEdgeFlags="left" />
+        <Spacer
+            latin:horizontalGap="4.0%p" />
         <Key
             latin:codes="59"
-            latin:keyLabel="@string/label_wait_key"
-            latin:horizontalGap="4.0%p" />
+            latin:keyLabel="@string/label_wait_key" />
         <!-- To match one character label size with "More" and "Wait", I placed spaces around the
              char ',' and '.'. -->
         <Key
@@ -85,22 +92,27 @@
         <Key
             latin:codes="46"
             latin:keyLabel=" . " />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="52"
             latin:keyIcon="@drawable/sym_keyboard_num4"
-            latin:horizontalGap="6.0%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="53"
-            latin:keyIcon="@drawable/sym_keyboard_num5" />
+            latin:keyIcon="@drawable/sym_keyboard_num5"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="54"
-            latin:keyIcon="@drawable/sym_keyboard_num6" />
+            latin:keyIcon="@drawable/sym_keyboard_num6"
+            latin:keyWidth="10.5%p " />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="@integer/key_return"
             latin:keyIcon="@drawable/sym_keyboard_return"
             latin:iconPreview="@drawable/sym_keyboard_feedback_return"
             latin:keyWidth="15.0%p"
-            latin:horizontalGap="6.0%p"
             latin:isModifier="true"
             latin:keyEdgeFlags="right" />
     </Row>
@@ -109,50 +121,60 @@
              char 'N', '(' and ')'. -->
         <!-- There is an empty area bellow the "More" key and left of the "(" key.  To ignore
              the touch event on the area, "(" is intentionally not marked as a left edge key. -->
+        <Spacer
+            latin:horizontalGap="19.0%p" />
         <Key
             latin:codes="78"
-            latin:keyLabel=" N "
-            latin:horizontalGap="19.0%p" />
+            latin:keyLabel=" N " />
         <Key
             latin:codes="40"
             latin:keyLabel=" ( " />
         <Key
             latin:codes="41"
             latin:keyLabel=" ) " />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="55"
             latin:keyIcon="@drawable/sym_keyboard_num7"
-            latin:horizontalGap="6.0%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="56"
-            latin:keyIcon="@drawable/sym_keyboard_num8" />
-        <!-- There is an empty area bellow the "Enter" key and right of the "9" key.  To ignore
-             the touch event on the area, "9" is intentionally not marked as a right edge key. -->
+            latin:keyIcon="@drawable/sym_keyboard_num8"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="57"
-            latin:keyIcon="@drawable/sym_keyboard_num9" />
+            latin:keyIcon="@drawable/sym_keyboard_num9"
+            latin:keyWidth="10.5%p " />
+        <!-- There is an empty area bellow the "Enter" key and right of the "9" key.  To ignore
+             the touch event on the area, "9" is intentionally not marked as a right edge key. -->
     </Row>
     <!-- This row is intentionally not marked as a bottom row -->
     <Row>
         <!-- There is an empty area bellow the "More" key and left of the "space" key.  To ignore
              the touch event on the area, "space" is intentionally not marked as a left edge key. -->
+        <Spacer
+            latin:horizontalGap="19.0%p" />
         <Key
             latin:codes="@integer/key_space"
             latin:keyIcon="@drawable/sym_keyboard_space"
             latin:iconPreview="@drawable/sym_keyboard_feedback_space"
-            latin:keyWidth="22.5%p"
-            latin:horizontalGap="19.0%p " />
+            latin:keyWidth="22.5%p" />
+        <Spacer
+            latin:horizontalGap="6.0%p" />
         <Key
             latin:codes="42"
             latin:keyIcon="@drawable/sym_keyboard_numstar"
-            latin:horizontalGap="6.0%p" />
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="48"
-            latin:keyIcon="@drawable/sym_keyboard_num0" />
-        <!-- There is an empty area bellow the "Enter" key and right of the "#" key.  To ignore
-             the touch event on the area, "#" is intentionally not marked as a right edge key. -->
+            latin:keyIcon="@drawable/sym_keyboard_num0"
+            latin:keyWidth="10.5%p " />
         <Key
             latin:codes="35"
-            latin:keyIcon="@drawable/sym_keyboard_numpound" />
+            latin:keyIcon="@drawable/sym_keyboard_numpound"
+            latin:keyWidth="10.5%p " />
+        <!-- There is an empty area bellow the "Enter" key and right of the "#" key.  To ignore
+             the touch event on the area, "#" is intentionally not marked as a right edge key. -->
     </Row>
 </Keyboard>
diff --git a/java/res/xml-xlarge/kbd_popup_template.xml b/java/res/xml-xlarge/kbd_popup_template.xml
index 382d90a..55ebda5 100644
--- a/java/res/xml-xlarge/kbd_popup_template.xml
+++ b/java/res/xml-xlarge/kbd_popup_template.xml
@@ -20,7 +20,7 @@
 
 <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="7.5%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="0px"
     latin:keyHeight="@dimen/key_height"
     >
diff --git a/java/res/xml-xlarge/kbd_qwerty.xml b/java/res/xml-xlarge/kbd_qwerty.xml
index b725034..9485ca7 100644
--- a/java/res/xml-xlarge/kbd_qwerty.xml
+++ b/java/res/xml-xlarge/kbd_qwerty.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="7.5%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
@@ -30,62 +30,63 @@
         <Key
             latin:codes="@integer/key_tab"
             latin:keyLabel="Tab"
+            latin:keyWidth="7.0%p"
             latin:isModifier="true"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="q"
-            latin:keyHintIcon="@drawable/keyboard_hint_1"
+            latin:keyHintIcon="@drawable/key_hint_1_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_q" />
         <Key
             latin:keyLabel="w"
-            latin:keyHintIcon="@drawable/keyboard_hint_2"
+            latin:keyHintIcon="@drawable/key_hint_2_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_w" />
         <Key
             latin:keyLabel="e"
-            latin:keyHintIcon="@drawable/keyboard_hint_3"
+            latin:keyHintIcon="@drawable/key_hint_3_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_e" />
         <Key
             latin:keyLabel="r"
-            latin:keyHintIcon="@drawable/keyboard_hint_4"
+            latin:keyHintIcon="@drawable/key_hint_4_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_r" />
         <Key
             latin:keyLabel="t"
-            latin:keyHintIcon="@drawable/keyboard_hint_5"
+            latin:keyHintIcon="@drawable/key_hint_5_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_t" />
         <Key
             latin:keyLabel="y"
-            latin:keyHintIcon="@drawable/keyboard_hint_6"
+            latin:keyHintIcon="@drawable/key_hint_6_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_y" />
         <Key
             latin:keyLabel="u"
-            latin:keyHintIcon="@drawable/keyboard_hint_7"
+            latin:keyHintIcon="@drawable/key_hint_7_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_u" />
         <Key
             latin:keyLabel="i"
-            latin:keyHintIcon="@drawable/keyboard_hint_8"
+            latin:keyHintIcon="@drawable/key_hint_8_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_i" />
         <Key
             latin:keyLabel="o"
-            latin:keyHintIcon="@drawable/keyboard_hint_9"
+            latin:keyHintIcon="@drawable/key_hint_9_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_o" />
         <Key
             latin:keyLabel="p"
-            latin:keyHintIcon="@drawable/keyboard_hint_0"
+            latin:keyHintIcon="@drawable/key_hint_0_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_p" />
         <Key
             latin:keyLabel="="
             latin:temporaryShiftKeyLabel="+"
-            latin:keyHintIcon="@drawable/keyboard_hint_plus"
+            latin:keyHintIcon="@drawable/key_hint_plus_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="+" />
         <Key
@@ -138,13 +139,13 @@
         <Key
             latin:keyLabel=";"
             latin:temporaryShiftKeyLabel=":"
-            latin:keyHintIcon="@drawable/keyboard_hint_colon"
+            latin:keyHintIcon="@drawable/key_hint_colon_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters=":" />
         <Key
             latin:keyLabel="\'"
             latin:temporaryShiftKeyLabel="&quot;"
-            latin:keyHintIcon="@drawable/keyboard_hint_quote"
+            latin:keyHintIcon="@drawable/key_hint_quote_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="&quot;" />
         <Key
@@ -195,13 +196,13 @@
         <Key
             latin:keyLabel=";"
             latin:temporaryShiftKeyLabel=":"
-            latin:keyHintIcon="@drawable/keyboard_hint_colon"
+            latin:keyHintIcon="@drawable/key_hint_colon_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters=":" />
         <Key
             latin:keyLabel="\'"
             latin:temporaryShiftKeyLabel="&quot;"
-            latin:keyHintIcon="@drawable/keyboard_hint_quote"
+            latin:keyHintIcon="@drawable/key_hint_quote_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="&quot;" />
         <Key
@@ -254,7 +255,7 @@
         <Key
             latin:keyLabel="\'"
             latin:temporaryShiftKeyLabel="&quot;"
-            latin:keyHintIcon="@drawable/keyboard_hint_quote"
+            latin:keyHintIcon="@drawable/key_hint_quote_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="&quot;" />
         <Key
@@ -305,13 +306,13 @@
         <Key
             latin:keyLabel=";"
             latin:temporaryShiftKeyLabel=":"
-            latin:keyHintIcon="@drawable/keyboard_hint_colon"
+            latin:keyHintIcon="@drawable/key_hint_colon_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters=":" />
         <Key
             latin:keyLabel="\'"
             latin:temporaryShiftKeyLabel="&quot;"
-            latin:keyHintIcon="@drawable/keyboard_hint_quote"
+            latin:keyHintIcon="@drawable/key_hint_quote_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="&quot;" />
         <Key
@@ -362,13 +363,13 @@
         <Key
             latin:keyLabel=";"
             latin:temporaryShiftKeyLabel=":"
-            latin:keyHintIcon="@drawable/keyboard_hint_colon"
+            latin:keyHintIcon="@drawable/key_hint_colon_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters=":" />
         <Key
             latin:keyLabel="\'"
             latin:temporaryShiftKeyLabel="&quot;"
-            latin:keyHintIcon="@drawable/keyboard_hint_quote"
+            latin:keyHintIcon="@drawable/key_hint_quote_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="&quot;" />
         <Key
@@ -415,19 +416,19 @@
         <Key
             latin:keyLabel=","
             latin:temporaryShiftKeyLabel="*"
-            latin:keyHintIcon="@drawable/keyboard_hint_star"
+            latin:keyHintIcon="@drawable/key_hint_star_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="*" />
         <Key
             latin:keyLabel="."
             latin:temporaryShiftKeyLabel="!"
-            latin:keyHintIcon="@drawable/keyboard_hint_exclamation"
+            latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="!" />
         <Key
             latin:keyLabel="/"
             latin:temporaryShiftKeyLabel="\?"
-            latin:keyHintIcon="@drawable/keyboard_hint_question"
+            latin:keyHintIcon="@drawable/key_hint_question_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\?" />
         <Key
@@ -475,19 +476,19 @@
         <Key
             latin:keyLabel=","
             latin:temporaryShiftKeyLabel="*"
-            latin:keyHintIcon="@drawable/keyboard_hint_star"
+            latin:keyHintIcon="@drawable/key_hint_star_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="*" />
         <Key
             latin:keyLabel="."
             latin:temporaryShiftKeyLabel="!"
-            latin:keyHintIcon="@drawable/keyboard_hint_exclamation"
+            latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="!" />
         <Key
             latin:keyLabel="/"
             latin:temporaryShiftKeyLabel="\?"
-            latin:keyHintIcon="@drawable/keyboard_hint_question"
+            latin:keyHintIcon="@drawable/key_hint_question_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\?" />
         <Key
@@ -583,19 +584,19 @@
         <Key
             latin:keyLabel=","
             latin:temporaryShiftKeyLabel="*"
-            latin:keyHintIcon="@drawable/keyboard_hint_star"
+            latin:keyHintIcon="@drawable/key_hint_star_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="*" />
         <Key
             latin:keyLabel="."
             latin:temporaryShiftKeyLabel="!"
-            latin:keyHintIcon="@drawable/keyboard_hint_exclamation"
+            latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="!" />
         <Key
             latin:keyLabel="/"
             latin:temporaryShiftKeyLabel="\?"
-            latin:keyHintIcon="@drawable/keyboard_hint_question"
+            latin:keyHintIcon="@drawable/key_hint_question_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\?" />
         <Key
@@ -643,19 +644,19 @@
         <Key
             latin:keyLabel=","
             latin:temporaryShiftKeyLabel="*"
-            latin:keyHintIcon="@drawable/keyboard_hint_star"
+            latin:keyHintIcon="@drawable/key_hint_star_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="*" />
         <Key
             latin:keyLabel="."
             latin:temporaryShiftKeyLabel="!"
-            latin:keyHintIcon="@drawable/keyboard_hint_exclamation"
+            latin:keyHintIcon="@drawable/key_hint_exclamation_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="!" />
         <Key
             latin:keyLabel="/"
             latin:temporaryShiftKeyLabel="\?"
-            latin:keyHintIcon="@drawable/keyboard_hint_question"
+            latin:keyHintIcon="@drawable/key_hint_question_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\?" />
         <Key
@@ -671,17 +672,18 @@
     <Row
         latin:keyboardMode="@+id/mode_normal"
     >
+        <Spacer
+            latin:horizontalGap="16.25%p" />
         <Key
             latin:keyLabel="("
             latin:temporaryShiftKeyLabel="&lt;"
-            latin:keyHintIcon="@drawable/keyboard_hint_smaller"
+            latin:keyHintIcon="@drawable/key_hint_smaller_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
-            latin:popupCharacters="&lt;"
-            latin:horizontalGap="16.25%p" />
+            latin:popupCharacters="&lt;" />
         <Key
             latin:keyLabel=")"
             latin:temporaryShiftKeyLabel="&gt;"
-            latin:keyHintIcon="@drawable/keyboard_hint_greater"
+            latin:keyHintIcon="@drawable/key_hint_larger_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="&gt;" />
         <Key
@@ -693,7 +695,7 @@
         <Key
             latin:keyLabel="_"
             latin:temporaryShiftKeyLabel="\@"
-            latin:keyHintIcon="@drawable/keyboard_hint_at"
+            latin:keyHintIcon="@drawable/key_hint_at_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\@" />
         <Key
@@ -706,11 +708,12 @@
     <Row
         latin:keyboardMode="@+id/mode_url"
     >
+        <Spacer
+            latin:horizontalGap="16.25%p" />
         <Key
             latin:keyLabel=".com"
-	    latin:keyOutputText=".com"
-	    latin:keyWidth="15.0%p"
-            latin:horizontalGap="16.25%p" />
+    	    latin:keyOutputText=".com"
+            latin:keyWidth="15.0%p" />
         <Key
             latin:codes="@integer/key_space"
             latin:keyIcon="@drawable/sym_keyboard_space"
@@ -720,7 +723,7 @@
         <Key
             latin:keyLabel="_"
             latin:temporaryShiftKeyLabel="\@"
-            latin:keyHintIcon="@drawable/keyboard_hint_at"
+            latin:keyHintIcon="@drawable/key_hint_at_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\@" />
         <Key
@@ -733,11 +736,12 @@
     <Row
         latin:keyboardMode="@+id/mode_email"
     >
+        <Spacer
+            latin:horizontalGap="16.25%p" />
         <Key
             latin:keyLabel=".com"
-	    latin:keyOutputText=".com"
-	    latin:keyWidth="15.0%p"
-            latin:horizontalGap="16.25%p" />
+            latin:keyOutputText=".com"
+            latin:keyWidth="15.0%p" />
         <Key
             latin:codes="@integer/key_space"
             latin:keyIcon="@drawable/sym_keyboard_space"
@@ -752,12 +756,13 @@
     <Row
         latin:keyboardMode="@+id/mode_im"
     >
+        <Spacer
+            latin:horizontalGap="16.25%p" />
         <Key
             latin:keyLabel=":-)"
             latin:keyOutputText=":-)"
             latin:popupKeyboard="@xml/popup_smileys"
-            latin:keyWidth="15.0%p"
-            latin:horizontalGap="16.25%p" />
+            latin:keyWidth="15.0%p" />
         <Key
             latin:codes="@integer/key_space"
             latin:keyIcon="@drawable/sym_keyboard_space"
@@ -767,7 +772,7 @@
         <Key
             latin:keyLabel="_"
             latin:temporaryShiftKeyLabel="\@"
-            latin:keyHintIcon="@drawable/keyboard_hint_at"
+            latin:keyHintIcon="@drawable/key_hint_at_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\@" />
         <Key
@@ -780,17 +785,18 @@
     <Row
         latin:keyboardMode="@+id/mode_webentry"
     >
+        <Spacer
+            latin:horizontalGap="16.25%p" />
         <Key
             latin:keyLabel="("
             latin:temporaryShiftKeyLabel="&lt;"
-            latin:keyHintIcon="@drawable/keyboard_hint_smaller"
+            latin:keyHintIcon="@drawable/key_hint_smaller_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
-            latin:popupCharacters="&lt;"
-            latin:horizontalGap="16.25%p" />
+            latin:popupCharacters="&lt;" />
         <Key
             latin:keyLabel=")"
             latin:temporaryShiftKeyLabel="&gt;"
-            latin:keyHintIcon="@drawable/keyboard_hint_greater"
+            latin:keyHintIcon="@drawable/key_hint_larger_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="&gt;" />
         <Key
@@ -802,7 +808,7 @@
         <Key
             latin:keyLabel="_"
             latin:temporaryShiftKeyLabel="\@"
-            latin:keyHintIcon="@drawable/keyboard_hint_at"
+            latin:keyHintIcon="@drawable/key_hint_at_holo"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="\@" />
         <Key
diff --git a/java/res/xml-xlarge/kbd_symbols.xml b/java/res/xml-xlarge/kbd_symbols.xml
index e570ff4..34fc114 100644
--- a/java/res/xml-xlarge/kbd_symbols.xml
+++ b/java/res/xml-xlarge/kbd_symbols.xml
@@ -21,8 +21,8 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="7.5%p"
-    latin:horizontalGap="0px"
-    latin:verticalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
+    latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
     <!-- This row is intentionally not marked as a top row -->
@@ -30,6 +30,7 @@
         <Key
             latin:codes="@integer/key_tab"
             latin:keyLabel="Tab"
+            latin:keyWidth="7.0%p"
             latin:isModifier="true"
             latin:keyEdgeFlags="left" />
         <Key
@@ -140,10 +141,11 @@
     </Row>
     <!-- This row is intentionally not marked as a bottom row -->
     <Row>
-        <Key
-            latin:keyLabel="&lt;"
+        <Spacer
             latin:horizontalGap="16.25%p" />
         <Key
+            latin:keyLabel="&lt;" />
+        <Key
             latin:keyLabel="&gt;" />
         <Key
             latin:codes="@integer/key_space"
diff --git a/java/res/xml-xlarge/kbd_symbols_shift.xml b/java/res/xml-xlarge/kbd_symbols_shift.xml
index 5ca2cc1..8ed1c11 100644
--- a/java/res/xml-xlarge/kbd_symbols_shift.xml
+++ b/java/res/xml-xlarge/kbd_symbols_shift.xml
@@ -21,8 +21,8 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="7.5%p"
-    latin:horizontalGap="0px"
-    latin:verticalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
+    latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
     <!-- This row is intentionally not marked as a top row -->
@@ -30,6 +30,7 @@
         <Key
             latin:codes="@integer/key_tab"
             latin:keyLabel="Tab"
+            latin:keyWidth="7.0%p"
             latin:isModifier="true"
             latin:keyEdgeFlags="left" />
         <Key
@@ -140,10 +141,11 @@
     </Row>
     <!-- This row is intentionally not marked as a bottom row -->
     <Row>
-        <Key
-            latin:keyLabel="≤"
+        <Spacer
             latin:horizontalGap="16.25%p" />
         <Key
+            latin:keyLabel="≤" />
+        <Key
             latin:keyLabel="≥" />
         <Key
             latin:codes="@integer/key_space"
diff --git a/java/res/xml/kbd_phone.xml b/java/res/xml/kbd_phone.xml
index 17e7ba2..e6f6a09 100644
--- a/java/res/xml/kbd_phone.xml
+++ b/java/res/xml/kbd_phone.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="26.67%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml/kbd_phone_black.xml b/java/res/xml/kbd_phone_black.xml
index 6ade277..86759d6 100644
--- a/java/res/xml/kbd_phone_black.xml
+++ b/java/res/xml/kbd_phone_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="26.67%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml/kbd_phone_symbols.xml b/java/res/xml/kbd_phone_symbols.xml
index 5062d47..1c691d2 100644
--- a/java/res/xml/kbd_phone_symbols.xml
+++ b/java/res/xml/kbd_phone_symbols.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="26.67%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml/kbd_phone_symbols_black.xml b/java/res/xml/kbd_phone_symbols_black.xml
index 2a6932a..3e46c53 100644
--- a/java/res/xml/kbd_phone_symbols_black.xml
+++ b/java/res/xml/kbd_phone_symbols_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="26.67%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml/kbd_popup_template.xml b/java/res/xml/kbd_popup_template.xml
index f1aa86f..004d490 100644
--- a/java/res/xml/kbd_popup_template.xml
+++ b/java/res/xml/kbd_popup_template.xml
@@ -20,7 +20,7 @@
 
 <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="0px"
     latin:keyHeight="@dimen/popup_key_height"
     >
diff --git a/java/res/xml/kbd_qwerty.xml b/java/res/xml/kbd_qwerty.xml
index 21a7ccb..517b4fe 100644
--- a/java/res/xml/kbd_qwerty.xml
+++ b/java/res/xml/kbd_qwerty.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
@@ -82,11 +82,12 @@
             latin:keyEdgeFlags="right" />
     </Row>
     <Row>
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="a"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_a"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="s"
diff --git a/java/res/xml/kbd_qwerty_black.xml b/java/res/xml/kbd_qwerty_black.xml
index adb10dc..76412f6 100644
--- a/java/res/xml/kbd_qwerty_black.xml
+++ b/java/res/xml/kbd_qwerty_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
@@ -82,11 +82,12 @@
             latin:keyEdgeFlags="right" />
     </Row>
     <Row>
+        <Spacer
+            latin:horizontalGap="5%p" />
         <Key
             latin:keyLabel="a"
             latin:popupKeyboard="@xml/kbd_popup_template"
             latin:popupCharacters="@string/alternates_for_a"
-            latin:horizontalGap="5%p"
             latin:keyEdgeFlags="left" />
         <Key
             latin:keyLabel="s"
diff --git a/java/res/xml/kbd_symbols.xml b/java/res/xml/kbd_symbols.xml
index 4ce9a86..83fb5a7 100644
--- a/java/res/xml/kbd_symbols.xml
+++ b/java/res/xml/kbd_symbols.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml/kbd_symbols_black.xml b/java/res/xml/kbd_symbols_black.xml
index dedd2da..b6a069c 100644
--- a/java/res/xml/kbd_symbols_black.xml
+++ b/java/res/xml/kbd_symbols_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml/kbd_symbols_shift.xml b/java/res/xml/kbd_symbols_shift.xml
index 52afa38..d83706b 100644
--- a/java/res/xml/kbd_symbols_shift.xml
+++ b/java/res/xml/kbd_symbols_shift.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/res/xml/kbd_symbols_shift_black.xml b/java/res/xml/kbd_symbols_shift_black.xml
index c1bd4e3..e5f8abf 100644
--- a/java/res/xml/kbd_symbols_shift_black.xml
+++ b/java/res/xml/kbd_symbols_shift_black.xml
@@ -21,7 +21,7 @@
 <Keyboard
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     latin:keyWidth="10%p"
-    latin:horizontalGap="0px"
+    latin:horizontalGap="@dimen/key_horizontal_gap"
     latin:verticalGap="@dimen/key_bottom_gap"
     latin:keyHeight="@dimen/key_height"
 >
diff --git a/java/src/com/android/inputmethod/latin/BaseKeyboard.java b/java/src/com/android/inputmethod/latin/BaseKeyboard.java
index bad1544..fc35ccc 100644
--- a/java/src/com/android/inputmethod/latin/BaseKeyboard.java
+++ b/java/src/com/android/inputmethod/latin/BaseKeyboard.java
@@ -61,6 +61,7 @@
     private static final String TAG_KEYBOARD = "Keyboard";
     private static final String TAG_ROW = "Row";
     private static final String TAG_KEY = "Key";
+    private static final String TAG_SPACER = "Spacer";
     private static final String TAG_INCLUDE = "include";
     private static final String TAG_MERGE = "merge";
 
@@ -273,8 +274,8 @@
         public Key(Row parent) {
             keyboard = parent.parent;
             height = parent.defaultHeight;
-            width = parent.defaultWidth;
             gap = parent.defaultHorizontalGap;
+            width = parent.defaultWidth - gap;
             edgeFlags = parent.rowEdgeFlags;
         }
 
@@ -290,21 +291,21 @@
         public Key(Resources res, Row parent, int x, int y, XmlResourceParser parser) {
             this(parent);
 
-            this.x = x;
-            this.y = y;
-
             TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parser),
                     R.styleable.BaseKeyboard);
-
-            width = getDimensionOrFraction(a, R.styleable.BaseKeyboard_keyWidth,
-                    keyboard.mDisplayWidth, parent.defaultWidth);
             height = getDimensionOrFraction(a, R.styleable.BaseKeyboard_keyHeight,
                     keyboard.mDisplayHeight, parent.defaultHeight);
             gap = getDimensionOrFraction(a, R.styleable.BaseKeyboard_horizontalGap,
                     keyboard.mDisplayWidth, parent.defaultHorizontalGap);
+            width = getDimensionOrFraction(a, R.styleable.BaseKeyboard_keyWidth,
+                    keyboard.mDisplayWidth, parent.defaultWidth) - gap;
             a.recycle();
             a = res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.BaseKeyboard_Key);
-            this.x += gap;
+
+            // Horizontal gap is divided equally to both sides of the key.
+            this.x = x + gap / 2;
+            this.y = y;
+
             TypedValue codesValue = new TypedValue();
             a.getValue(R.styleable.BaseKeyboard_Key_codes, codesValue);
             if (codesValue.type == TypedValue.TYPE_INT_DEC
@@ -731,6 +732,10 @@
             mTotalHeight = mCurrentY - defaultVerticalGap;
         }
 
+        public void setSpacer(int gap) {
+            mCurrentX += gap;
+        }
+
         public int getMaxRowWidth() {
             return mMaxRowWidth;
         }
@@ -774,6 +779,8 @@
                     mKeys.add(key);
                     if (key.codes[0] == KEYCODE_SHIFT)
                         mShiftKeys.add(key);
+                } else if (TAG_SPACER.equals(tag)) {
+                    parseSpacerAttribute(res, parser, state);
                 } else if (TAG_KEYBOARD.equals(tag)) {
                     parseKeyboardAttributes(res, parser);
                 } else if (TAG_INCLUDE.equals(tag)) {
@@ -791,6 +798,8 @@
                     state.endKey(key);
                 } else if (TAG_ROW.equals(tag)) {
                     state.endRow();
+                } else if (TAG_SPACER.equals(tag)) {
+                    ;
                 } else if (TAG_KEYBOARD.equals(tag)) {
                     state.endKeyboard(mDefaultVerticalGap);
                 } else if (TAG_INCLUDE.equals(tag)) {
@@ -804,6 +813,15 @@
         }
     }
 
+    private void parseSpacerAttribute(Resources res, XmlResourceParser parser,
+            KeyboardParseState state) {
+        TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.BaseKeyboard);
+        int gap = getDimensionOrFraction(a,
+                R.styleable.BaseKeyboard_horizontalGap, mDisplayWidth, 0);
+        a.recycle();
+        state.setSpacer(gap);
+    }
+
     private void parseInclude(Resources res, XmlResourceParser parent, KeyboardParseState state)
             throws XmlPullParserException, IOException {
         final TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parent),
@@ -848,19 +866,14 @@
     private void parseKeyboardAttributes(Resources res, XmlResourceParser parser) {
         TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parser),
                 R.styleable.BaseKeyboard);
-
         mDefaultWidth = getDimensionOrFraction(a,
-                R.styleable.BaseKeyboard_keyWidth,
-                mDisplayWidth, mDisplayWidth / 10);
+                R.styleable.BaseKeyboard_keyWidth, mDisplayWidth, mDisplayWidth / 10);
         mDefaultHeight = getDimensionOrFraction(a,
-                R.styleable.BaseKeyboard_keyHeight,
-                mDisplayHeight, 50);
+                R.styleable.BaseKeyboard_keyHeight, mDisplayHeight, 50);
         mDefaultHorizontalGap = getDimensionOrFraction(a,
-                R.styleable.BaseKeyboard_horizontalGap,
-                mDisplayWidth, 0);
+                R.styleable.BaseKeyboard_horizontalGap, mDisplayWidth, 0);
         mDefaultVerticalGap = getDimensionOrFraction(a,
-                R.styleable.BaseKeyboard_verticalGap,
-                mDisplayHeight, 0);
+                R.styleable.BaseKeyboard_verticalGap, mDisplayHeight, 0);
         mProximityThreshold = (int) (mDefaultWidth * SEARCH_DISTANCE);
         mProximityThreshold = mProximityThreshold * mProximityThreshold;
         a.recycle();