• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    <!-- Base key style for the key which may have settings or tab key as popup key. -->
25    <switch>
26        <case
27            latin:clobberSettingsKey="true"
28        >
29            <key-style
30                latin:styleName="f1PopupStyle"
31                latin:keyLabelOption="hasPopupHint"
32                latin:moreKeys="@string/more_keys_for_f1"
33                latin:backgroundType="functional" />
34        </case>
35        <!-- clobberSettingsKey="false -->
36        <case
37            latin:hasSettingsKey="false"
38        >
39            <key-style
40                latin:styleName="f1PopupStyle"
41                latin:keyLabelOption="hasPopupHint"
42                latin:moreKeys="@string/more_keys_for_f1_settings"
43                latin:backgroundType="functional" />
44        </case>
45        <!-- clobberSettingsKey="false" hasSettingsKey="true" -->
46        <case
47            latin:navigateAction="true"
48        >
49            <key-style
50                latin:styleName="f1PopupStyle"
51                latin:keyLabelOption="hasPopupHint"
52                latin:moreKeys="@string/more_keys_for_f1_navigate"
53                latin:backgroundType="functional" />
54        </case>
55        <!-- clobberSettingsKey="false" and hasSettingsKey="true" navigateAction="false" -->
56        <default>
57            <key-style
58                latin:styleName="f1PopupStyle"
59                latin:keyLabelOption="hasPopupHint"
60                latin:moreKeys="@string/more_keys_for_f1"
61                latin:backgroundType="functional" />
62        </default>
63    </switch>
64    <!-- Functional key styles -->
65    <key-style
66        latin:styleName="shiftKeyStyle"
67        latin:code="@integer/key_shift"
68        latin:keyIcon="iconShiftKey"
69        latin:keyIconShifted="iconShiftedShiftKey"
70        latin:backgroundType="sticky" />
71    <key-style
72        latin:styleName="deleteKeyStyle"
73        latin:code="@integer/key_delete"
74        latin:keyIcon="iconDeleteKey"
75        latin:backgroundType="functional"
76        latin:isRepeatable="true" />
77    <!-- Return key style -->
78    <switch>
79        <case
80            latin:mode="im"
81        >
82            <!-- Smiley key. -->
83            <key-style
84                latin:styleName="returnKeyStyle"
85                latin:keyLabel=":-)"
86                latin:keyOutputText=":-) "
87                latin:keyLabelOption="hasPopupHint"
88                latin:moreKeys="@string/more_keys_for_smiley"
89                latin:maxMoreKeysColumn="5"
90                latin:backgroundType="functional" />
91        </case>
92        <case
93            latin:imeAction="actionGo"
94        >
95            <key-style
96                latin:styleName="returnKeyStyle"
97                latin:code="@integer/key_return"
98                latin:keyLabel="@string/label_go_key"
99                latin:keyLabelOption="autoXScale"
100                latin:backgroundType="action" />
101        </case>
102        <case
103            latin:imeAction="actionNext"
104        >
105            <key-style
106                latin:styleName="returnKeyStyle"
107                latin:code="@integer/key_return"
108                latin:keyLabel="@string/label_next_key"
109                latin:keyLabelOption="autoXScale"
110                latin:backgroundType="action" />
111        </case>
112        <case
113            latin:imeAction="actionDone"
114        >
115            <key-style
116                latin:styleName="returnKeyStyle"
117                latin:code="@integer/key_return"
118                latin:keyLabel="@string/label_done_key"
119                latin:keyLabelOption="autoXScale"
120                latin:backgroundType="action" />
121        </case>
122        <case
123            latin:imeAction="actionSend"
124        >
125            <key-style
126                latin:styleName="returnKeyStyle"
127                latin:code="@integer/key_return"
128                latin:keyLabel="@string/label_send_key"
129                latin:keyLabelOption="autoXScale"
130                latin:backgroundType="action" />
131        </case>
132        <case
133            latin:imeAction="actionSearch"
134        >
135            <key-style
136                latin:styleName="returnKeyStyle"
137                latin:code="@integer/key_return"
138                latin:keyIcon="iconSearchKey"
139                latin:backgroundType="action" />
140        </case>
141        <default>
142            <key-style
143                latin:styleName="returnKeyStyle"
144                latin:code="@integer/key_return"
145                latin:keyIcon="iconReturnKey"
146                latin:backgroundType="functional" />
147        </default>
148    </switch>
149    <key-style
150        latin:styleName="spaceKeyStyle"
151        latin:code="@integer/key_space"
152        latin:backgroundType="functional" />
153    <key-style
154        latin:styleName="shortcutKeyStyle"
155        latin:code="@integer/key_shortcut"
156        latin:keyIcon="iconShortcutKey"
157        latin:keyIconPreview="iconPreviewShortcutKey"
158        latin:parentStyle="f1PopupStyle" />
159    <key-style
160        latin:styleName="settingsKeyStyle"
161        latin:code="@integer/key_settings"
162        latin:keyIcon="iconSettingsKey"
163        latin:keyIconPreview="iconPreviewSettingsKey"
164        latin:backgroundType="functional" />
165    <key-style
166        latin:styleName="tabKeyStyle"
167        latin:code="@integer/key_tab"
168        latin:keyIcon="iconTabKey"
169        latin:keyIconPreview="iconPreviewTabKey"
170        latin:backgroundType="functional" />
171    <!-- Note: This key style is not for functional tab key. This is used for the tab key which is
172         laid out as normal letter key. -->
173    <key-style
174        latin:styleName="nonSpecialBackgroundTabKeyStyle"
175        latin:code="@integer/key_tab"
176        latin:keyIcon="iconTabKey"
177        latin:keyIconPreview="iconPreviewTabKey" />
178    <switch>
179        <!-- When this qwerty keyboard has no shortcut keys but shortcut key is enabled, then symbol
180             keyboard will have a shortcut key. That means we should use
181             iconToSymbolKeyWithShortcutKey here. -->
182        <case
183            latin:shortcutKeyEnabled="true"
184            latin:hasShortcutKey="false"
185        >
186            <key-style
187                latin:styleName="toSymbolKeyStyle"
188                latin:code="@integer/key_switch_alpha_symbol"
189                latin:keyIcon="iconShortcutForLabel"
190                latin:keyLabel="@string/label_to_symbol_with_microphone_key"
191                latin:keyLabelOption="withIconRight"
192                latin:backgroundType="functional" />
193        </case>
194        <default>
195            <key-style
196                latin:styleName="toSymbolKeyStyle"
197                latin:code="@integer/key_switch_alpha_symbol"
198                latin:keyLabel="@string/label_to_symbol_key"
199                latin:backgroundType="functional" />
200        </default>
201    </switch>
202    <key-style
203        latin:styleName="toAlphaKeyStyle"
204        latin:code="@integer/key_switch_alpha_symbol"
205        latin:keyLabel="@string/label_to_alpha_key"
206        latin:backgroundType="functional" />
207    <key-style
208        latin:styleName="toMoreSymbolKeyStyle"
209        latin:code="@integer/key_shift"
210        latin:keyLabel="@string/label_to_more_symbol_key"
211        latin:backgroundType="functional" />
212    <key-style
213        latin:styleName="backFromMoreSymbolKeyStyle"
214        latin:code="@integer/key_shift"
215        latin:keyLabel="@string/label_to_symbol_key"
216        latin:backgroundType="functional" />
217    <key-style
218        latin:styleName="punctuationKeyStyle"
219        latin:keyLabel="."
220        latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
221        latin:keyLabelOption="hasPopupHint"
222        latin:moreKeys="@string/more_keys_for_punctuation"
223        latin:maxMoreKeysColumn="@integer/mini_keyboard_column_for_punctuation"
224        latin:backgroundType="functional" />
225</merge>
226