Home | History | Annotate | Download | only in xml
      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 or tab key as popup key. -->
     39     <include
     40         latin:keyboardLayout="@xml/key_styles_f1" />
     41     <!-- Functional key styles -->
     42     <!-- Base style for shift key. A single space is used for dummy label in moreKeys. -->
     43     <key-style
     44         latin:styleName="baseForShiftKeyStyle"
     45         latin:code="!code/key_shift"
     46         latin:keyActionFlags="noKeyPreview"
     47         latin:keyLabelFlags="preserveCase"
     48         latin:moreKeys="!noPanelAutoMoreKey!, |!code/key_capslock" />
     49     <switch>
     50         <case
     51             latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetAutomaticShifted"
     52         >
     53             <key-style
     54                 latin:styleName="shiftKeyStyle"
     55                 latin:keyIcon="!icon/shift_key_shifted"
     56                 latin:backgroundType="stickyOff"
     57                 latin:parentStyle="baseForShiftKeyStyle" />
     58         </case>
     59         <case
     60             latin:keyboardLayoutSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
     61         >
     62             <key-style
     63                 latin:styleName="shiftKeyStyle"
     64                 latin:keyIcon="!icon/shift_key_shifted"
     65                 latin:backgroundType="stickyOn"
     66                 latin:parentStyle="baseForShiftKeyStyle" />
     67         </case>
     68         <default>
     69             <key-style
     70                 latin:styleName="shiftKeyStyle"
     71                 latin:keyIcon="!icon/shift_key"
     72                 latin:backgroundType="stickyOff"
     73                 latin:parentStyle="baseForShiftKeyStyle" />
     74         </default>
     75     </switch>
     76     <key-style
     77         latin:styleName="deleteKeyStyle"
     78         latin:code="!code/key_delete"
     79         latin:keyIcon="!icon/delete_key"
     80         latin:keyActionFlags="isRepeatable|noKeyPreview"
     81         latin:backgroundType="functional" />
     82     <include
     83         latin:keyboardLayout="@xml/key_styles_enter" />
     84     <key-style
     85         latin:styleName="spaceKeyStyle"
     86         latin:code="!code/key_space"
     87         latin:keyActionFlags="noKeyPreview|enableLongPress" />
     88     <!-- U+200C: ZERO WIDTH NON-JOINER
     89          U+200D: ZERO WIDTH JOINER -->
     90     <key-style
     91         latin:styleName="zwnjKeyStyle"
     92         latin:code="0x200C"
     93         latin:keyIcon="!icon/zwnj_key"
     94         latin:moreKeys="!icon/zwj_key|&#x200D;"
     95         latin:keyLabelFlags="hasPopupHint"
     96         latin:keyActionFlags="noKeyPreview" />
     97     <key-style
     98         latin:styleName="shortcutKeyStyle"
     99         latin:code="!code/key_shortcut"
    100         latin:keyIcon="!icon/shortcut_key"
    101         latin:keyIconDisabled="!icon/shortcut_key_disabled"
    102         latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
    103         latin:altCode="!code/key_space"
    104         latin:parentStyle="f1MoreKeysStyle" />
    105     <key-style
    106         latin:styleName="settingsKeyStyle"
    107         latin:code="!code/key_settings"
    108         latin:keyIcon="!icon/settings_key"
    109         latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
    110         latin:altCode="!code/key_space"
    111         latin:backgroundType="functional" />
    112     <key-style
    113         latin:styleName="languageSwitchKeyStyle"
    114         latin:code="!code/key_language_switch"
    115         latin:keyIcon="!icon/language_switch_key"
    116         latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
    117         latin:altCode="!code/key_space" />
    118     <key-style
    119         latin:styleName="emojiKeyStyle"
    120         latin:code="!code/key_emoji"
    121         latin:keyIcon="!icon/emoji_key"
    122         latin:keyActionFlags="noKeyPreview"
    123         latin:backgroundType="functional" />
    124     <!-- Overriding EnterKeyStyle here -->
    125     <switch>
    126         <!-- Shift + Enter in textMultiLine field. -->
    127         <case
    128             latin:isMultiLine="true"
    129             latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
    130         >
    131             <key-style
    132                 latin:styleName="enterKeyStyle"
    133                 latin:parentStyle="shiftEnterKeyStyle" />
    134         </case>
    135         <!-- Smiley in textShortMessage field.
    136              Overrides common enter key style. -->
    137         <case
    138             latin:mode="im"
    139         >
    140             <key-style
    141                 latin:styleName="enterKeyStyle"
    142                 latin:parentStyle="emojiKeyStyle" />
    143         </case>
    144     </switch>
    145     <key-style
    146         latin:styleName="tabKeyStyle"
    147         latin:code="!code/key_tab"
    148         latin:keyIcon="!icon/tab_key"
    149         latin:keyIconPreview="!icon/tab_key_preview"
    150         latin:backgroundType="functional" />
    151     <!-- Note: This key style is not for functional tab key. This is used for the tab key which is
    152          laid out as normal letter key. -->
    153     <key-style
    154         latin:styleName="nonSpecialBackgroundTabKeyStyle"
    155         latin:code="!code/key_tab"
    156         latin:keyIcon="!icon/tab_key"
    157         latin:keyIconPreview="!icon/tab_key_preview" />
    158     <key-style
    159         latin:styleName="baseForLayoutSwitchKeyStyle"
    160         latin:keyLabelFlags="preserveCase"
    161         latin:keyActionFlags="noKeyPreview"
    162         latin:backgroundType="functional" />
    163     <switch>
    164         <!-- When this qwerty keyboard has no shortcut keys but shortcut key is enabled, then symbol
    165              keyboard will have a shortcut key. That means we should use label_to_symbol_key label
    166              and shortcut_for_label icon. -->
    167         <case
    168             latin:shortcutKeyOnSymbols="true"
    169         >
    170             <key-style
    171                 latin:styleName="baseForToSymbolKeyStyle"
    172                 latin:keyIcon="!icon/shortcut_for_label"
    173                 latin:keyLabel="!text/label_to_symbol_with_microphone_key"
    174                 latin:keyLabelFlags="withIconRight|preserveCase"
    175                 latin:parentStyle="baseForLayoutSwitchKeyStyle" />
    176         </case>
    177         <default>
    178             <key-style
    179                 latin:styleName="baseForToSymbolKeyStyle"
    180                 latin:keyLabel="!text/label_to_symbol_key"
    181                 latin:parentStyle="baseForLayoutSwitchKeyStyle" />
    182         </default>
    183     </switch>
    184     <key-style
    185         latin:styleName="toSymbolKeyStyle"
    186         latin:code="!code/key_switch_alpha_symbol"
    187         latin:parentStyle="baseForToSymbolKeyStyle" />
    188     <key-style
    189         latin:styleName="toAlphaKeyStyle"
    190         latin:code="!code/key_switch_alpha_symbol"
    191         latin:keyLabel="!text/label_to_alpha_key"
    192         latin:parentStyle="baseForLayoutSwitchKeyStyle" />
    193     <key-style
    194         latin:styleName="toMoreSymbolKeyStyle"
    195         latin:code="!code/key_shift"
    196         latin:keyLabel="!text/label_to_more_symbol_key"
    197         latin:parentStyle="baseForLayoutSwitchKeyStyle" />
    198     <key-style
    199         latin:styleName="backFromMoreSymbolKeyStyle"
    200         latin:code="!code/key_shift"
    201         latin:parentStyle="baseForToSymbolKeyStyle" />
    202     <key-style
    203         latin:styleName="punctuationKeyStyle"
    204         latin:keyLabel="."
    205         latin:keyLabelFlags="hasPopupHint"
    206         latin:moreKeys="!text/more_keys_for_punctuation"
    207         latin:backgroundType="functional" />
    208     <key-style
    209         latin:styleName="comKeyStyle"
    210         latin:keyLabel="!text/keylabel_for_popular_domain"
    211         latin:keyLabelFlags="autoXScale|fontNormal|hasPopupHint|preserveCase"
    212         latin:keyOutputText="!text/keylabel_for_popular_domain"
    213         latin:moreKeys="!text/more_keys_for_popular_domain"
    214         latin:backgroundType="functional" />
    215 </merge>
    216