Fix label of switch to symbols key when symbols has shortcut key

This change fixes the labels of switch to symbols key and switch back
from more symbols key when symbols layout has shortcut key.

Change-Id: I3fbbef2d929486d0f0542f4d89cb086d9f5bad82
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 3eb27e7..2f1a209 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -389,6 +389,7 @@
         <attr name="passwordInput" format="boolean" />
         <attr name="clobberSettingsKey" format="boolean" />
         <attr name="shortcutKeyEnabled" format="boolean" />
+        <attr name="shortcutKeyOnSymbols" format="boolean" />
         <attr name="hasShortcutKey" format="boolean" />
         <attr name="languageSwitchKeyEnabled" format="boolean" />
         <attr name="isMultiLine" format="boolean" />
diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml
index bf2e76a..6b06ce7 100644
--- a/java/res/xml-sw600dp/key_styles_common.xml
+++ b/java/res/xml-sw600dp/key_styles_common.xml
@@ -154,31 +154,30 @@
         </default>
     </switch>
     <key-style
-        latin:styleName="toSymbolKeyStyle"
-        latin:code="!code/key_switch_alpha_symbol"
-        latin:keyLabel="!text/label_to_symbol_key"
+        latin:styleName="baseForLayoutSwitchKeyStyle"
         latin:keyLabelFlags="preserveCase"
         latin:keyActionFlags="noKeyPreview"
         latin:backgroundType="functional" />
     <key-style
+        latin:styleName="toSymbolKeyStyle"
+        latin:code="!code/key_switch_alpha_symbol"
+        latin:keyLabel="!text/label_to_symbol_key"
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
+    <key-style
         latin:styleName="toAlphaKeyStyle"
         latin:code="!code/key_switch_alpha_symbol"
         latin:keyLabel="!text/label_to_alpha_key"
-        latin:keyLabelFlags="preserveCase"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="toMoreSymbolKeyStyle"
         latin:code="!code/key_shift"
         latin:keyLabel="!text/label_to_more_symbol_for_tablet_key"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="backFromMoreSymbolKeyStyle"
         latin:code="!code/key_shift"
         latin:keyLabel="!text/label_to_symbol_key"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="comKeyStyle"
         latin:keyLabel="!text/keylabel_for_popular_domain"
diff --git a/java/res/xml-sw768dp/key_styles_common.xml b/java/res/xml-sw768dp/key_styles_common.xml
index 537e768..4d10f5b 100644
--- a/java/res/xml-sw768dp/key_styles_common.xml
+++ b/java/res/xml-sw768dp/key_styles_common.xml
@@ -144,33 +144,30 @@
         </default>
     </switch>
     <key-style
-        latin:styleName="toSymbolKeyStyle"
-        latin:code="!code/key_switch_alpha_symbol"
-        latin:keyLabel="!text/label_to_symbol_key"
+        latin:styleName="baseForLayoutSwitchKeyStyle"
         latin:keyLabelFlags="fontNormal|preserveCase"
         latin:keyActionFlags="noKeyPreview"
         latin:backgroundType="functional" />
     <key-style
+        latin:styleName="toSymbolKeyStyle"
+        latin:code="!code/key_switch_alpha_symbol"
+        latin:keyLabel="!text/label_to_symbol_key"
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
+    <key-style
         latin:styleName="toAlphaKeyStyle"
         latin:code="!code/key_switch_alpha_symbol"
         latin:keyLabel="!text/label_to_alpha_key"
-        latin:keyLabelFlags="fontNormal|preserveCase"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="toMoreSymbolKeyStyle"
         latin:code="!code/key_shift"
         latin:keyLabel="!text/label_to_more_symbol_for_tablet_key"
-        latin:keyLabelFlags="fontNormal"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="backFromMoreSymbolKeyStyle"
         latin:code="!code/key_shift"
         latin:keyLabel="!text/label_to_symbol_key"
-        latin:keyLabelFlags="fontNormal"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="comKeyStyle"
         latin:keyLabel="!text/keylabel_for_popular_domain"
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index 162119d..91ebac1 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -134,52 +134,50 @@
         latin:code="!code/key_tab"
         latin:keyIcon="!icon/tab_key"
         latin:keyIconPreview="!icon/tab_key_preview" />
+    <key-style
+        latin:styleName="baseForLayoutSwitchKeyStyle"
+        latin:keyLabelFlags="preserveCase"
+        latin:keyActionFlags="noKeyPreview"
+        latin:backgroundType="functional" />
     <switch>
         <!-- When this qwerty keyboard has no shortcut keys but shortcut key is enabled, then symbol
              keyboard will have a shortcut key. That means we should use label_to_symbol_key label
              and shortcut_for_label icon. -->
         <case
-            latin:shortcutKeyEnabled="true"
-            latin:hasShortcutKey="false"
+            latin:shortcutKeyOnSymbols="true"
         >
             <key-style
-                latin:styleName="toSymbolKeyStyle"
-                latin:code="!code/key_switch_alpha_symbol"
+                latin:styleName="baseForToSymbolKeyStyle"
                 latin:keyIcon="!icon/shortcut_for_label"
                 latin:keyLabel="!text/label_to_symbol_with_microphone_key"
                 latin:keyLabelFlags="withIconRight|preserveCase"
-                latin:keyActionFlags="noKeyPreview"
-                latin:backgroundType="functional" />
+                latin:parentStyle="baseForLayoutSwitchKeyStyle" />
         </case>
         <default>
             <key-style
-                latin:styleName="toSymbolKeyStyle"
-                latin:code="!code/key_switch_alpha_symbol"
+                latin:styleName="baseForToSymbolKeyStyle"
                 latin:keyLabel="!text/label_to_symbol_key"
-                latin:keyLabelFlags="preserveCase"
-                latin:keyActionFlags="noKeyPreview"
-                latin:backgroundType="functional" />
+                latin:parentStyle="baseForLayoutSwitchKeyStyle" />
         </default>
     </switch>
     <key-style
+        latin:styleName="toSymbolKeyStyle"
+        latin:code="!code/key_switch_alpha_symbol"
+        latin:parentStyle="baseForToSymbolKeyStyle" />
+    <key-style
         latin:styleName="toAlphaKeyStyle"
         latin:code="!code/key_switch_alpha_symbol"
         latin:keyLabel="!text/label_to_alpha_key"
-        latin:keyLabelFlags="preserveCase"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="toMoreSymbolKeyStyle"
         latin:code="!code/key_shift"
         latin:keyLabel="!text/label_to_more_symbol_key"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
     <key-style
         latin:styleName="backFromMoreSymbolKeyStyle"
         latin:code="!code/key_shift"
-        latin:keyLabel="!text/label_to_symbol_key"
-        latin:keyActionFlags="noKeyPreview"
-        latin:backgroundType="functional" />
+        latin:parentStyle="baseForToSymbolKeyStyle" />
     <key-style
         latin:styleName="punctuationKeyStyle"
         latin:keyLabel="."