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