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