key_styles_common.xml revision c9aa1beb6de6bbea71af8eba94354bff3001e0ac
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 <switch> 25 <case 26 latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted" 27 > 28 <key-style 29 latin:styleName="hasShiftedLetterHintStyle" 30 latin:keyLabelFlags="hasShiftedLetterHint|shiftedLetterActivated" /> 31 </case> 32 <default> 33 <key-style 34 latin:styleName="hasShiftedLetterHintStyle" 35 latin:keyLabelFlags="hasShiftedLetterHint" /> 36 </default> 37 </switch> 38 <!-- Base key style for the key which may have settings key as more keys. --> 39 <key-style 40 latin:styleName="baseSettingsMoreKeysStyle" /> 41 <include 42 latin:keyboardLayout="@xml/key_styles_settings" /> 43 <!-- Functional key styles --> 44 <!-- Base style for shift key. A single space is used for dummy label in moreKeys. --> 45 <key-style 46 latin:styleName="baseForShiftKeyStyle" 47 latin:keyActionFlags="noKeyPreview" 48 latin:keyLabelFlags="preserveCase" 49 latin:moreKeys="!noPanelAutoMoreKey!, |!code/key_capslock" /> 50 <switch> 51 <case 52 latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetAutomaticShifted" 53 > 54 <key-style 55 latin:styleName="shiftKeyStyle" 56 latin:keySpec="!icon/shift_key_shifted|!code/key_shift" 57 latin:backgroundType="stickyOff" 58 latin:parentStyle="baseForShiftKeyStyle" /> 59 </case> 60 <case 61 latin:keyboardLayoutSetElement="alphabetShiftLocked|alphabetShiftLockShifted" 62 > 63 <key-style 64 latin:styleName="shiftKeyStyle" 65 latin:keySpec="!icon/shift_key_shifted|!code/key_shift" 66 latin:backgroundType="stickyOn" 67 latin:parentStyle="baseForShiftKeyStyle" /> 68 </case> 69 <default> 70 <key-style 71 latin:styleName="shiftKeyStyle" 72 latin:keySpec="!icon/shift_key|!code/key_shift" 73 latin:backgroundType="stickyOff" 74 latin:parentStyle="baseForShiftKeyStyle" /> 75 </default> 76 </switch> 77 <key-style 78 latin:styleName="deleteKeyStyle" 79 latin:keySpec="!icon/delete_key|!code/key_delete" 80 latin:keyActionFlags="isRepeatable|noKeyPreview" 81 latin:backgroundType="functional" /> 82 <!-- emojiKeyStyle must be defined before including @xml/key_syles_enter. --> 83 <key-style 84 latin:styleName="emojiKeyStyle" 85 latin:keySpec="!icon/emoji_action_key|!code/key_emoji" 86 latin:keyActionFlags="noKeyPreview" 87 latin:backgroundType="action" /> 88 <include 89 latin:keyboardLayout="@xml/key_styles_enter" /> 90 <!-- TODO: Currently there is no way to specify icon alignment per theme. --> 91 <key-style 92 latin:styleName="spaceKeyStyle" 93 latin:keySpec="!icon/space_key|!code/key_space" 94 latin:keyActionFlags="noKeyPreview|enableLongPress" /> 95 <!-- U+200C: ZERO WIDTH NON-JOINER 96 U+200D: ZERO WIDTH JOINER --> 97 <key-style 98 latin:styleName="zwnjKeyStyle" 99 latin:keySpec="!icon/zwnj_key|‌" 100 latin:moreKeys="!icon/zwj_key|‍" 101 latin:keyLabelFlags="hasPopupHint" 102 latin:keyActionFlags="noKeyPreview" /> 103 <key-style 104 latin:styleName="shortcutKeyStyle" 105 latin:keySpec="!icon/shortcut_key|!code/key_shortcut" 106 latin:keyIconDisabled="!icon/shortcut_key_disabled" 107 latin:keyActionFlags="noKeyPreview|altCodeWhileTyping" 108 latin:altCode="!code/key_space" 109 latin:parentStyle="settingsMoreKeysStyle" /> 110 <key-style 111 latin:styleName="settingsKeyStyle" 112 latin:keySpec="!icon/settings_key|!code/key_settings" 113 latin:keyActionFlags="noKeyPreview|altCodeWhileTyping" 114 latin:altCode="!code/key_space" 115 latin:backgroundType="functional" /> 116 <key-style 117 latin:styleName="languageSwitchKeyStyle" 118 latin:keySpec="!icon/language_switch_key|!code/key_language_switch" 119 latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress" 120 latin:altCode="!code/key_space" /> 121 <key-style 122 latin:styleName="tabKeyStyle" 123 latin:keySpec="!icon/tab_key|!code/key_tab" 124 latin:backgroundType="functional" /> 125 <!-- Note: This key style is not for functional tab key. This is used for the tab key which is 126 laid out as normal letter key. --> 127 <key-style 128 latin:styleName="nonSpecialBackgroundTabKeyStyle" 129 latin:keySpec="!icon/tab_key|!code/key_tab" /> 130 <key-style 131 latin:styleName="baseForLayoutSwitchKeyStyle" 132 latin:keyLabelFlags="preserveCase|followFunctionalTextColor" 133 latin:keyActionFlags="noKeyPreview" 134 latin:backgroundType="functional" /> 135 <key-style 136 latin:styleName="toSymbolKeyStyle" 137 latin:keySpec="!text/keylabel_to_symbol|!code/key_switch_alpha_symbol" 138 latin:parentStyle="baseForLayoutSwitchKeyStyle" /> 139 <key-style 140 latin:styleName="toAlphaKeyStyle" 141 latin:keySpec="!text/keylabel_to_alpha|!code/key_switch_alpha_symbol" 142 latin:parentStyle="baseForLayoutSwitchKeyStyle" /> 143 <key-style 144 latin:styleName="toMoreSymbolKeyStyle" 145 latin:keySpec="!text/keylabel_to_more_symbol|!code/key_shift" 146 latin:parentStyle="baseForLayoutSwitchKeyStyle" /> 147 <key-style 148 latin:styleName="backFromMoreSymbolKeyStyle" 149 latin:keySpec="!text/keylabel_to_symbol|!code/key_shift" 150 latin:parentStyle="baseForLayoutSwitchKeyStyle" /> 151 <key-style 152 latin:styleName="comKeyStyle" 153 latin:keySpec="!text/keyspec_popular_domain" 154 latin:keyLabelFlags="autoXScale|fontNormal|hasPopupHint|preserveCase" 155 latin:moreKeys="!text/morekeys_popular_domain" 156 latin:backgroundType="functional" /> 157</merge> 158