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