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