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