Microphone key on 10-inch tablet on the far right vs where it is on phones

This change also re-introduces colored action key, that was disbaled
by I1c7335c5.

Bug: 6568834
Change-Id: I0c04b86049325c84492d90457cee0c16c57937f8
diff --git a/java/res/xml-sw768dp/key_settings.xml b/java/res/xml-sw768dp/key_settings.xml
index 0359a99..0d3bb59 100644
--- a/java/res/xml-sw768dp/key_settings.xml
+++ b/java/res/xml-sw768dp/key_settings.xml
@@ -32,4 +32,4 @@
             <Spacer />
         </default>
     </switch>
- </merge>
+</merge>
diff --git a/java/res/xml-sw768dp/key_shortcut.xml b/java/res/xml-sw768dp/key_shortcut.xml
index 9052705..2d09ebb 100644
--- a/java/res/xml-sw768dp/key_shortcut.xml
+++ b/java/res/xml-sw768dp/key_shortcut.xml
@@ -28,5 +28,9 @@
             <Key
                 latin:keyStyle="shortcutKeyStyle" />
         </case>
+        <default>
+            <!-- The empty space instead of shortcut key. -->
+            <Spacer />
+        </default>
     </switch>
 </merge>
diff --git a/java/res/xml-sw768dp/key_styles_common.xml b/java/res/xml-sw768dp/key_styles_common.xml
index f2fb90b..40082ac 100644
--- a/java/res/xml-sw768dp/key_styles_common.xml
+++ b/java/res/xml-sw768dp/key_styles_common.xml
@@ -74,12 +74,6 @@
     <include
         latin:keyboardLayout="@xml/key_styles_enter" />
     <key-style
-        latin:styleName="defaultActionKeyStyle"
-        latin:code="!code/key_action_enter"
-        latin:keyIcon="!icon/undefined"
-        latin:backgroundType="functional"
-        latin:parentStyle="defaultEnterKeyStyle" />
-    <key-style
         latin:styleName="spaceKeyStyle"
         latin:code="!code/key_space"
         latin:keyActionFlags="noKeyPreview" />
diff --git a/java/res/xml-sw768dp/keys_f1f2.xml b/java/res/xml-sw768dp/keys_f1f2.xml
deleted file mode 100644
index 5697035..0000000
--- a/java/res/xml-sw768dp/keys_f1f2.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?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:mode="url"
-        >
-            <Key
-                latin:keyStyle="comKeyStyle"
-                latin:keyWidth="16.084%p" />
-        </case>
-        <default>
-            <switch>
-                <case
-                    latin:mode="email"
-                >
-                    <Key
-                        latin:keyStyle="comKeyStyle" />
-                </case>
-                <case
-                    latin:imeAction="actionSearch"
-                >
-                    <Key
-                        latin:keyLabel=":"
-                        latin:keyHintLabel="+"
-                        latin:moreKeys="+"
-                        latin:keyStyle="hasShiftedLetterHintStyle" />
-                </case>
-                <default>
-                    <Key
-                        latin:keyStyle="smileyKeyStyle" />
-                </default>
-            </switch>
-            <switch>
-                <case
-                    latin:mode="email"
-                >
-                    <Key
-                        latin:keyLabel="\@" />
-                </case>
-                <default>
-                    <Key
-                        latin:keyLabel="/"
-                        latin:keyHintLabel="\@"
-                        latin:moreKeys="\@"
-                        latin:keyStyle="hasShiftedLetterHintStyle" />
-                </default>
-            </switch>
-        </default>
-    </switch>
-</merge>
diff --git a/java/res/xml-sw768dp/row_dvorak4.xml b/java/res/xml-sw768dp/row_dvorak4.xml
index ebe517d..0827815 100644
--- a/java/res/xml-sw768dp/row_dvorak4.xml
+++ b/java/res/xml-sw768dp/row_dvorak4.xml
@@ -23,22 +23,24 @@
 >
     <Row
         latin:keyWidth="8.047%p"
+        latin:backgroundType="functional"
     >
         <include
+            latin:keyXPos="5.782%p"
             latin:keyboardLayout="@xml/key_settings" />
         <include
-            latin:keyXPos="13.829%p"
-            latin:keyboardLayout="@xml/keys_f1f2" />
+            latin:keyboardLayout="@xml/key_shortcut" />
+        <include
+            latin:keyboardLayout="@xml/key_f1" />
         <include
             latin:keyXPos="29.923%p"
-            latin:keyboardLayout="@xml/key_space" />
+            latin:keyboardLayout="@xml/key_space"
+            latin:backgroundType="normal" />
         <include
             latin:keyboardLayout="@xml/key_question_exclamation" />
         <include
             latin:keyboardLayout="@xml/key_dash" />
         <include
-            latin:keyXPos="-8.047%p"
-            latin:keyWidth="fillRight"
-            latin:keyboardLayout="@xml/key_shortcut" />
+            latin:keyboardLayout="@xml/key_f2" />
     </Row>
 </merge>
diff --git a/java/res/xml-sw768dp/row_hebrew4.xml b/java/res/xml-sw768dp/row_hebrew4.xml
index 477fd0d..180c564 100644
--- a/java/res/xml-sw768dp/row_hebrew4.xml
+++ b/java/res/xml-sw768dp/row_hebrew4.xml
@@ -23,20 +23,22 @@
 >
     <Row
         latin:keyWidth="8.047%p"
+        latin:backgroundType="functional"
     >
         <include
+            latin:keyXPos="5.782%p"
             latin:keyboardLayout="@xml/key_settings" />
         <include
-            latin:keyXPos="13.829%p"
-            latin:keyboardLayout="@xml/keys_f1f2" />
+            latin:keyboardLayout="@xml/key_shortcut" />
+        <include
+            latin:keyboardLayout="@xml/key_f1" />
         <include
             latin:keyXPos="29.923%p"
-            latin:keyboardLayout="@xml/key_space" />
+            latin:keyboardLayout="@xml/key_space"
+            latin:backgroundType="normal" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <include
-            latin:keyXPos="-8.047%p"
-            latin:keyWidth="fillRight"
-            latin:keyboardLayout="@xml/key_shortcut" />
+            latin:keyboardLayout="@xml/key_f2" />
     </Row>
 </merge>
diff --git a/java/res/xml-sw768dp/row_qwerty4.xml b/java/res/xml-sw768dp/row_qwerty4.xml
index 32a6476..92411f5 100644
--- a/java/res/xml-sw768dp/row_qwerty4.xml
+++ b/java/res/xml-sw768dp/row_qwerty4.xml
@@ -23,22 +23,24 @@
 >
     <Row
         latin:keyWidth="8.047%p"
+        latin:backgroundType="functional"
     >
         <include
+            latin:keyXPos="5.782%p"
             latin:keyboardLayout="@xml/key_settings" />
         <include
-            latin:keyXPos="13.829%p"
-            latin:keyboardLayout="@xml/keys_f1f2" />
+            latin:keyboardLayout="@xml/key_shortcut" />
+        <include
+            latin:keyboardLayout="@xml/key_f1" />
         <include
             latin:keyXPos="29.923%p"
-            latin:keyboardLayout="@xml/key_space" />
+            latin:keyboardLayout="@xml/key_space"
+            latin:backgroundType="normal" />
         <include
             latin:keyboardLayout="@xml/key_apostrophe" />
         <include
             latin:keyboardLayout="@xml/key_dash" />
         <include
-            latin:keyXPos="-8.047%p"
-            latin:keyWidth="fillRight"
-            latin:keyboardLayout="@xml/key_shortcut" />
+            latin:keyboardLayout="@xml/key_f2" />
     </Row>
 </merge>
diff --git a/java/res/xml-sw768dp/row_symbols4.xml b/java/res/xml-sw768dp/row_symbols4.xml
index bd85b40..4e1c119 100644
--- a/java/res/xml-sw768dp/row_symbols4.xml
+++ b/java/res/xml-sw768dp/row_symbols4.xml
@@ -23,25 +23,22 @@
 >
     <Row
         latin:keyWidth="8.047%p"
+        latin:backgroundType="functional"
     >
+        <Key
+            latin:keyXPos="13.829%p"
+            latin:keyLabel="/" />
         <include
-            latin:keyboardLayout="@xml/key_settings" />
-        <Key
-            latin:keyLabel="/"
-            latin:keyXPos="13.829%p" />
-        <Key
-            latin:keyLabel="\@" />
+            latin:keyboardLayout="@xml/key_f1" />
         <include
             latin:keyXPos="29.923%p"
-            latin:keyboardLayout="@xml/key_space" />
+            latin:keyboardLayout="@xml/key_space"
+            latin:backgroundType="normal" />
         <Key
             latin:keyLabel="&quot;"
             latin:moreKeys="!text/more_keys_for_tablet_double_quote" />
         <Key
             latin:keyLabel="_" />
-        <include
-            latin:keyXPos="-8.047%p"
-            latin:keyWidth="fillRight"
-            latin:keyboardLayout="@xml/key_shortcut" />
+        <!-- Here is empty space. -->
     </Row>
 </merge>
diff --git a/java/res/xml-sw768dp/row_symbols_shift4.xml b/java/res/xml-sw768dp/row_symbols_shift4.xml
index 82c1d17..561351c 100644
--- a/java/res/xml-sw768dp/row_symbols_shift4.xml
+++ b/java/res/xml-sw768dp/row_symbols_shift4.xml
@@ -23,15 +23,13 @@
 >
     <Row
         latin:keyWidth="8.047%p"
+        latin:backgroundType="functional"
     >
-        <include
-            latin:keyboardLayout="@xml/key_settings" />
+        <!-- Here is empty space. -->
         <include
             latin:keyXPos="29.923%p"
-            latin:keyboardLayout="@xml/key_space" />
-        <include
-            latin:keyXPos="-8.047%p"
-            latin:keyWidth="fillRight"
-            latin:keyboardLayout="@xml/key_shortcut" />
+            latin:keyboardLayout="@xml/key_space"
+            latin:backgroundType="normal" />
+        <!-- Here is empty space. -->
     </Row>
 </merge>
diff --git a/java/res/xml-sw768dp/rows_number_normal.xml b/java/res/xml-sw768dp/rows_number_normal.xml
index 42697ce..84910a8 100644
--- a/java/res/xml-sw768dp/rows_number_normal.xml
+++ b/java/res/xml-sw768dp/rows_number_normal.xml
@@ -30,15 +30,18 @@
             latin:keyLabel="-"
             latin:keyStyle="numKeyStyle"
             latin:keyXPos="13.829%p"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel="+"
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel="."
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel="1"
             latin:keyStyle="numKeyStyle"
@@ -60,11 +63,13 @@
             latin:keyWidth="13.829%p" />
         <Key
             latin:keyStyle="numStarKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel="/"
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <switch>
             <case
                 latin:mode="time|datetime"
@@ -74,13 +79,15 @@
                     latin:keyLabelFlags="hasPopupHint"
                     latin:moreKeys="!text/more_keys_for_am_pm"
                     latin:keyStyle="numKeyStyle"
-                    latin:keyWidth="8.047%p" />
+                    latin:keyWidth="8.047%p"
+                    latin:backgroundType="functional" />
             </case>
             <default>
                 <Key
                     latin:keyLabel=","
                     latin:keyStyle="numKeyStyle"
-                    latin:keyWidth="8.047%p" />
+                    latin:keyWidth="8.047%p"
+                    latin:backgroundType="functional" />
             </default>
         </switch>
         <Key
@@ -105,11 +112,13 @@
         <Key
             latin:keyLabel="("
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel=")"
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <switch>
             <case
                 latin:mode="time|datetime"
@@ -117,13 +126,15 @@
                 <Key
                     latin:keyLabel=":"
                     latin:keyStyle="numKeyStyle"
-                    latin:keyWidth="8.047%p" />
+                    latin:keyWidth="8.047%p"
+                    latin:backgroundType="functional" />
             </case>
             <default>
                 <Key
                     latin:keyLabel="="
                     latin:keyStyle="numKeyStyle"
-                    latin:keyWidth="8.047%p" />
+                    latin:keyWidth="8.047%p"
+                    latin:backgroundType="functional" />
             </default>
         </switch>
         <Key
@@ -146,7 +157,8 @@
         <Key
             latin:keyStyle="spaceKeyStyle"
             latin:keyXPos="13.829%p"
-            latin:keyWidth="24.140%p" />
+            latin:keyWidth="24.140%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyStyle="numStarKeyStyle"
             latin:keyXPos="43.125%p" />
@@ -156,9 +168,5 @@
         <Key
             latin:keyLabel="#"
             latin:keyStyle="numKeyStyle" />
-        <include
-            latin:keyXPos="-8.047%p"
-            latin:keyWidth="fillRight"
-            latin:keyboardLayout="@xml/key_shortcut" />
     </Row>
 </merge>
diff --git a/java/res/xml-sw768dp/rows_phone.xml b/java/res/xml-sw768dp/rows_phone.xml
index b3b3521..2f718db 100644
--- a/java/res/xml-sw768dp/rows_phone.xml
+++ b/java/res/xml-sw768dp/rows_phone.xml
@@ -34,14 +34,17 @@
             latin:keyLabel="-"
             latin:keyStyle="numKeyStyle"
             latin:keyXPos="13.829%p"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel="+"
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyStyle="numPauseKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyStyle="num1KeyStyle"
             latin:keyXPos="43.125%p" />
@@ -62,14 +65,17 @@
             latin:keyLabel=","
             latin:keyStyle="numKeyStyle"
             latin:keyXPos="13.829%p"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel="."
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyStyle="numWaitKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyStyle="num4KeyStyle"
             latin:keyXPos="43.125%p" />
@@ -89,15 +95,18 @@
         <Key
             latin:keyLabel="("
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel=")"
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyLabel="N"
             latin:keyStyle="numKeyStyle"
-            latin:keyWidth="8.047%p" />
+            latin:keyWidth="8.047%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyStyle="num7KeyStyle"
             latin:keyXPos="43.125%p" />
@@ -115,7 +124,8 @@
         <Key
             latin:keyStyle="spaceKeyStyle"
             latin:keyXPos="13.829%p"
-            latin:keyWidth="24.140%p" />
+            latin:keyWidth="24.140%p"
+            latin:backgroundType="functional" />
         <Key
             latin:keyStyle="numStarKeyStyle"
             latin:keyXPos="43.125%p" />
@@ -124,9 +134,5 @@
         <Key
             latin:keyLabel="#"
             latin:keyStyle="numKeyStyle" />
-        <include
-            latin:keyXPos="-8.047%p"
-            latin:keyWidth="fillRight"
-            latin:keyboardLayout="@xml/key_shortcut" />
-    </Row>
+   </Row>
 </merge>