key_styles_common.xml revision a94c89e017dac92e2c23dcf05a8e6b4000d021d3
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    <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    <!-- emojiKeyStyle must be defined before including @xml/key_syles_enter. -->
81    <key-style
82        latin:styleName="emojiKeyStyle"
83        latin:keySpec="!icon/emoji_action_key|!code/key_emoji"
84        latin:keyActionFlags="noKeyPreview"
85        latin:backgroundType="action" />
86    <include
87        latin:keyboardLayout="@xml/key_styles_enter" />
88    <!-- TODO: Currently there is no way to specify icon alignment per theme. -->
89    <key-style
90        latin:styleName="spaceKeyStyle"
91        latin:keySpec="!icon/space_key|!code/key_space"
92        latin:keyActionFlags="noKeyPreview|enableLongPress" />
93    <!-- U+200C: ZERO WIDTH NON-JOINER
94         U+200D: ZERO WIDTH JOINER -->
95    <key-style
96        latin:styleName="zwnjKeyStyle"
97        latin:keySpec="!icon/zwnj_key|&#x200C;"
98        latin:moreKeys="!icon/zwj_key|&#x200D;"
99        latin:keyLabelFlags="hasPopupHint"
100        latin:keyActionFlags="noKeyPreview" />
101    <key-style
102        latin:styleName="shortcutKeyStyle"
103        latin:keySpec="!icon/shortcut_key|!code/key_shortcut"
104        latin:keyIconDisabled="!icon/shortcut_key_disabled"
105        latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
106        latin:altCode="!code/key_space"
107        latin:parentStyle="settingsMoreKeysStyle" />
108    <key-style
109        latin:styleName="settingsKeyStyle"
110        latin:keySpec="!icon/settings_key|!code/key_settings"
111        latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
112        latin:altCode="!code/key_space"
113        latin:backgroundType="functional" />
114    <key-style
115        latin:styleName="languageSwitchKeyStyle"
116        latin:keySpec="!icon/language_switch_key|!code/key_language_switch"
117        latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
118        latin:altCode="!code/key_space" />
119    <key-style
120        latin:styleName="tabKeyStyle"
121        latin:keySpec="!icon/tab_key|!code/key_tab"
122        latin:backgroundType="functional" />
123    <!-- Note: This key style is not for functional tab key. This is used for the tab key which is
124         laid out as normal letter key. -->
125    <key-style
126        latin:styleName="nonSpecialBackgroundTabKeyStyle"
127        latin:keySpec="!icon/tab_key|!code/key_tab" />
128    <key-style
129        latin:styleName="baseForLayoutSwitchKeyStyle"
130        latin:keyLabelFlags="preserveCase|followFunctionalTextColor"
131        latin:keyActionFlags="noKeyPreview"
132        latin:backgroundType="functional" />
133    <key-style
134        latin:styleName="toSymbolKeyStyle"
135        latin:keySpec="!text/keylabel_to_symbol|!code/key_switch_alpha_symbol"
136        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
137    <key-style
138        latin:styleName="toAlphaKeyStyle"
139        latin:keySpec="!text/keylabel_to_alpha|!code/key_switch_alpha_symbol"
140        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
141    <key-style
142        latin:styleName="toMoreSymbolKeyStyle"
143        latin:keySpec="!text/keylabel_to_more_symbol|!code/key_shift"
144        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
145    <key-style
146        latin:styleName="backFromMoreSymbolKeyStyle"
147        latin:keySpec="!text/keylabel_to_symbol|!code/key_shift"
148        latin:parentStyle="baseForLayoutSwitchKeyStyle" />
149    <key-style
150        latin:styleName="comKeyStyle"
151        latin:keySpec="!text/keyspec_popular_domain"
152        latin:keyLabelFlags="autoXScale|fontNormal|hasPopupHint|preserveCase"
153        latin:moreKeys="!text/morekeys_popular_domain"
154        latin:backgroundType="functional" />
155</merge>
156