• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4**
5** Copyright 2011, 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        latin:parentStyle="hasShiftedLetterHintStyle" />
42    <include
43        latin:keyboardLayout="@xml/key_styles_settings" />
44    <!-- Functional key styles -->
45    <!-- Base style for shift key. A single space is used for dummy label in moreKeys. -->
46    <key-style
47        latin:styleName="baseForShiftKeyStyle"
48        latin:keyActionFlags="noKeyPreview"
49        latin:keyLabelFlags="preserveCase"
50        latin:moreKeys="!noPanelAutoMoreKey!, |!code/key_capslock" />
51    <switch>
52        <case
53            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetAutomaticShifted"
54        >
55            <key-style
56                latin:styleName="shiftKeyStyle"
57                latin:keySpec="!icon/shift_key_shifted|!code/key_shift"
58                latin:backgroundType="stickyOff"
59                latin:parentStyle="baseForShiftKeyStyle" />
60        </case>
61        <case
62            latin:keyboardLayoutSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
63        >
64            <key-style
65                latin:styleName="shiftKeyStyle"
66                latin:keySpec="!icon/shift_key_shifted|!code/key_shift"
67                latin:backgroundType="stickyOn"
68                latin:parentStyle="baseForShiftKeyStyle" />
69        </case>
70        <default>
71            <key-style
72                latin:styleName="shiftKeyStyle"
73                latin:keySpec="!icon/shift_key|!code/key_shift"
74                latin:backgroundType="stickyOff"
75                latin:parentStyle="baseForShiftKeyStyle" />
76        </default>
77    </switch>
78    <key-style
79        latin:styleName="deleteKeyStyle"
80        latin:keySpec="!icon/delete_key|!code/key_delete"
81        latin:keyActionFlags="isRepeatable|noKeyPreview"
82        latin:backgroundType="functional" />
83    <include
84        latin:keyboardLayout="@xml/key_styles_enter" />
85    <!-- TODO: Currently there is no way to specify icon alignment per theme. -->
86    <key-style
87        latin:styleName="spaceKeyStyle"
88        latin:keySpec="!icon/space_key|!code/key_space"
89        latin:backgroundType="spacebar"
90        latin:keyActionFlags="noKeyPreview|enableLongPress" />
91    <!-- U+200C: ZERO WIDTH NON-JOINER
92         U+200D: ZERO WIDTH JOINER -->
93    <key-style
94        latin:styleName="zwnjKeyStyle"
95        latin:keySpec="!icon/zwnj_key|&#x200C;"
96        latin:moreKeys="!icon/zwj_key|&#x200D;"
97        latin:keyLabelFlags="hasPopupHint"
98        latin:keyActionFlags="noKeyPreview" />
99    <key-style
100        latin:styleName="shortcutKeyStyle"
101        latin:keySpec="!icon/shortcut_key|!code/key_shortcut"
102        latin:keyIconDisabled="!icon/shortcut_key_disabled"
103        latin:keyActionFlags="noKeyPreview"
104        latin:backgroundType="functional" />
105    <key-style
106        latin:styleName="languageSwitchKeyStyle"
107        latin:keySpec="!icon/language_switch_key|!code/key_language_switch"
108        latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
109        latin:altCode="!code/key_space" />
110    <key-style
111        latin:styleName="emojiKeyStyle"
112        latin:keySpec="!icon/emoji_normal_key|!code/key_emoji"
113        latin:keyActionFlags="noKeyPreview"
114        latin:backgroundType="functional" />
115    <key-style
116        latin:styleName="settingsKeyStyle"
117        latin:keySpec="!icon/settings_key|!code/key_settings"
118        latin:keyActionFlags="noKeyPreview"
119        latin:backgroundType="functional" />
120    <switch>
121        <case
122            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
123            latin:navigatePrevious="true"
124        >
125            <key-style
126                latin:styleName="tabKeyStyle"
127                latin:keySpec="!icon/tab_key|!code/key_action_previous"
128                latin:backgroundType="functional" />
129        </case>
130        <case
131            latin:keyboardLayoutSetElement="alphabet|alphabetAutomaticShifted|alphabetShiftLocked"
132            latin:navigateNext="true"
133        >
134            <key-style
135                latin:styleName="tabKeyStyle"
136                latin:keySpec="!icon/tab_key|!code/key_action_next"
137                latin:backgroundType="functional" />
138        </case>
139        <default>
140            <key-style
141                latin:styleName="tabKeyStyle"
142                latin:keySpec="!icon/tab_key|!code/key_tab"
143                latin:backgroundType="functional" />
144        </default>
145    </switch>
146    <key-style
147        latin:styleName="baseForLayoutSwitchKeyStyle"
148        latin:keyLabelFlags="preserveCase|followFunctionalTextColor"
149        latin:keyActionFlags="noKeyPreview"
150        latin:backgroundType="functional" />
151    <key-style
152        latin:styleName="toSymbolKeyStyle"
153        latin:keySpec="!text/keylabel_to_symbol|!code/key_switch_alpha_symbol"
154        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
155    <key-style
156        latin:styleName="toAlphaKeyStyle"
157        latin:keySpec="!text/keylabel_to_alpha|!code/key_switch_alpha_symbol"
158        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
159    <key-style
160        latin:styleName="toMoreSymbolKeyStyle"
161        latin:keySpec="!text/keylabel_tablet_to_more_symbol|!code/key_shift"
162        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
163    <key-style
164        latin:styleName="backFromMoreSymbolKeyStyle"
165        latin:keySpec="!text/keylabel_to_symbol|!code/key_shift"
166        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
167    <key-style
168        latin:styleName="comKeyStyle"
169        latin:keySpec="!text/keyspec_popular_domain"
170        latin:keyLabelFlags="autoXScale|fontNormal|hasPopupHint|preserveCase"
171        latin:moreKeys="!text/morekeys_popular_domain" />
172</merge>
173