1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 /* 4 ** 5 ** Copyright 2010, The Android Open Source Project 6 ** 7 ** Licensed under the Apache License, Version 2.0 (the "License"); 8 ** you may not use this file except in compliance with the License. 9 ** You may obtain a copy of the License at 10 ** 11 ** http://www.apache.org/licenses/LICENSE-2.0 12 ** 13 ** Unless required by applicable law or agreed to in writing, software 14 ** distributed under the License is distributed on an "AS IS" BASIS, 15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 ** See the License for the specific language governing permissions and 17 ** limitations under the License. 18 */ 19 --> 20 21 <merge 22 xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" 23 > 24 <!-- Base key style for the key which may have settings or tab key as popup key. --> 25 <switch> 26 <case 27 latin:clobberSettingsKey="true" 28 > 29 <key-style 30 latin:styleName="f1PopupStyle" 31 latin:keyLabelOption="hasPopupHint" 32 latin:moreKeys="@string/more_keys_for_f1" 33 latin:backgroundType="functional" /> 34 </case> 35 <!-- clobberSettingsKey="false --> 36 <case 37 latin:hasSettingsKey="false" 38 > 39 <key-style 40 latin:styleName="f1PopupStyle" 41 latin:keyLabelOption="hasPopupHint" 42 latin:moreKeys="@string/more_keys_for_f1_settings" 43 latin:backgroundType="functional" /> 44 </case> 45 <!-- clobberSettingsKey="false" hasSettingsKey="true" --> 46 <case 47 latin:navigateAction="true" 48 > 49 <key-style 50 latin:styleName="f1PopupStyle" 51 latin:keyLabelOption="hasPopupHint" 52 latin:moreKeys="@string/more_keys_for_f1_navigate" 53 latin:backgroundType="functional" /> 54 </case> 55 <!-- clobberSettingsKey="false" and hasSettingsKey="true" navigateAction="false" --> 56 <default> 57 <key-style 58 latin:styleName="f1PopupStyle" 59 latin:keyLabelOption="hasPopupHint" 60 latin:moreKeys="@string/more_keys_for_f1" 61 latin:backgroundType="functional" /> 62 </default> 63 </switch> 64 <!-- Functional key styles --> 65 <key-style 66 latin:styleName="shiftKeyStyle" 67 latin:code="@integer/key_shift" 68 latin:keyIcon="iconShiftKey" 69 latin:keyIconShifted="iconShiftedShiftKey" 70 latin:backgroundType="sticky" /> 71 <key-style 72 latin:styleName="deleteKeyStyle" 73 latin:code="@integer/key_delete" 74 latin:keyIcon="iconDeleteKey" 75 latin:backgroundType="functional" 76 latin:isRepeatable="true" /> 77 <!-- Return key style --> 78 <switch> 79 <case 80 latin:mode="im" 81 > 82 <!-- Smiley key. --> 83 <key-style 84 latin:styleName="returnKeyStyle" 85 latin:keyLabel=":-)" 86 latin:keyOutputText=":-) " 87 latin:keyLabelOption="hasPopupHint" 88 latin:moreKeys="@string/more_keys_for_smiley" 89 latin:maxMoreKeysColumn="5" 90 latin:backgroundType="functional" /> 91 </case> 92 <case 93 latin:imeAction="actionGo" 94 > 95 <key-style 96 latin:styleName="returnKeyStyle" 97 latin:code="@integer/key_return" 98 latin:keyLabel="@string/label_go_key" 99 latin:keyLabelOption="autoXScale" 100 latin:backgroundType="action" /> 101 </case> 102 <case 103 latin:imeAction="actionNext" 104 > 105 <key-style 106 latin:styleName="returnKeyStyle" 107 latin:code="@integer/key_return" 108 latin:keyLabel="@string/label_next_key" 109 latin:keyLabelOption="autoXScale" 110 latin:backgroundType="action" /> 111 </case> 112 <case 113 latin:imeAction="actionDone" 114 > 115 <key-style 116 latin:styleName="returnKeyStyle" 117 latin:code="@integer/key_return" 118 latin:keyLabel="@string/label_done_key" 119 latin:keyLabelOption="autoXScale" 120 latin:backgroundType="action" /> 121 </case> 122 <case 123 latin:imeAction="actionSend" 124 > 125 <key-style 126 latin:styleName="returnKeyStyle" 127 latin:code="@integer/key_return" 128 latin:keyLabel="@string/label_send_key" 129 latin:keyLabelOption="autoXScale" 130 latin:backgroundType="action" /> 131 </case> 132 <case 133 latin:imeAction="actionSearch" 134 > 135 <key-style 136 latin:styleName="returnKeyStyle" 137 latin:code="@integer/key_return" 138 latin:keyIcon="iconSearchKey" 139 latin:backgroundType="action" /> 140 </case> 141 <default> 142 <key-style 143 latin:styleName="returnKeyStyle" 144 latin:code="@integer/key_return" 145 latin:keyIcon="iconReturnKey" 146 latin:backgroundType="functional" /> 147 </default> 148 </switch> 149 <key-style 150 latin:styleName="spaceKeyStyle" 151 latin:code="@integer/key_space" 152 latin:backgroundType="functional" /> 153 <key-style 154 latin:styleName="shortcutKeyStyle" 155 latin:code="@integer/key_shortcut" 156 latin:keyIcon="iconShortcutKey" 157 latin:parentStyle="f1PopupStyle" /> 158 <key-style 159 latin:styleName="settingsKeyStyle" 160 latin:code="@integer/key_settings" 161 latin:keyIcon="iconSettingsKey" 162 latin:backgroundType="functional" /> 163 <key-style 164 latin:styleName="tabKeyStyle" 165 latin:code="@integer/key_tab" 166 latin:keyIcon="iconTabKey" 167 latin:keyIconPreview="iconPreviewTabKey" 168 latin:backgroundType="functional" /> 169 <!-- Note: This key style is not for functional tab key. This is used for the tab key which is 170 laid out as normal letter key. --> 171 <key-style 172 latin:styleName="nonSpecialBackgroundTabKeyStyle" 173 latin:code="@integer/key_tab" 174 latin:keyIcon="iconTabKey" 175 latin:keyIconPreview="iconPreviewTabKey" /> 176 <switch> 177 <!-- When this qwerty keyboard has no shortcut keys but shortcut key is enabled, then symbol 178 keyboard will have a shortcut key. That means we should use 179 iconToSymbolKeyWithShortcutKey here. --> 180 <case 181 latin:shortcutKeyEnabled="true" 182 latin:hasShortcutKey="false" 183 > 184 <key-style 185 latin:styleName="toSymbolKeyStyle" 186 latin:code="@integer/key_switch_alpha_symbol" 187 latin:keyIcon="iconShortcutForLabel" 188 latin:keyLabel="@string/label_to_symbol_with_microphone_key" 189 latin:keyLabelOption="withIconRight" 190 latin:backgroundType="functional" /> 191 </case> 192 <default> 193 <key-style 194 latin:styleName="toSymbolKeyStyle" 195 latin:code="@integer/key_switch_alpha_symbol" 196 latin:keyLabel="@string/label_to_symbol_key" 197 latin:backgroundType="functional" /> 198 </default> 199 </switch> 200 <key-style 201 latin:styleName="toAlphaKeyStyle" 202 latin:code="@integer/key_switch_alpha_symbol" 203 latin:keyLabel="@string/label_to_alpha_key" 204 latin:backgroundType="functional" /> 205 <key-style 206 latin:styleName="toMoreSymbolKeyStyle" 207 latin:code="@integer/key_shift" 208 latin:keyLabel="@string/label_to_more_symbol_key" 209 latin:backgroundType="functional" /> 210 <key-style 211 latin:styleName="backFromMoreSymbolKeyStyle" 212 latin:code="@integer/key_shift" 213 latin:keyLabel="@string/label_to_symbol_key" 214 latin:backgroundType="functional" /> 215 <key-style 216 latin:styleName="punctuationKeyStyle" 217 latin:keyLabel="." 218 latin:keyHintLabel="@string/keyhintlabel_for_punctuation" 219 latin:keyLabelOption="hasPopupHint" 220 latin:moreKeys="@string/more_keys_for_punctuation" 221 latin:maxMoreKeysColumn="@integer/mini_keyboard_column_for_punctuation" 222 latin:backgroundType="functional" /> 223 </merge> 224