• 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    <include
26        latin:keyboardLayout="@xml/key_styles_f1" />
27    <!-- Functional key styles -->
28    <switch>
29        <case
30            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetAutomaticShifted"
31        >
32            <key-style
33                latin:styleName="shiftKeyStyle"
34                latin:code="!code/key_shift"
35                latin:keyIcon="!icon/shift_key_shifted"
36                latin:keyActionFlags="noKeyPreview"
37                latin:backgroundType="stickyOff" />
38        </case>
39        <case
40            latin:keyboardLayoutSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
41        >
42            <key-style
43                latin:styleName="shiftKeyStyle"
44                latin:code="!code/key_shift"
45                latin:keyIcon="!icon/shift_key_shifted"
46                latin:keyActionFlags="noKeyPreview"
47                latin:backgroundType="stickyOn" />
48        </case>
49        <default>
50            <key-style
51                latin:styleName="shiftKeyStyle"
52                latin:code="!code/key_shift"
53                latin:keyIcon="!icon/shift_key"
54                latin:keyActionFlags="noKeyPreview"
55                latin:backgroundType="stickyOff" />
56        </default>
57    </switch>
58    <key-style
59        latin:styleName="deleteKeyStyle"
60        latin:code="!code/key_delete"
61        latin:keyIcon="!icon/delete_key"
62        latin:keyActionFlags="isRepeatable|noKeyPreview"
63        latin:backgroundType="functional" />
64    <include
65        latin:keyboardLayout="@xml/key_styles_enter" />
66    <switch>
67        <!-- Shift + Enter in textMultiLine field. -->
68        <case
69            latin:isMultiLine="true"
70            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
71        >
72            <key-style
73                latin:styleName="enterKeyStyle"
74                latin:parentStyle="defaultEnterKeyStyle" />
75        </case>
76        <!-- Smiley in textShortMessage field.
77             Overrides common enter key style. -->
78        <case
79            latin:mode="im"
80        >
81            <key-style
82                latin:styleName="enterKeyStyle"
83                latin:keyLabel=":-)"
84                latin:keyOutputText=":-) "
85                latin:keyLabelFlags="hasPopupHint"
86                latin:moreKeys="!text/more_keys_for_smiley"
87                latin:backgroundType="functional" />
88        </case>
89    </switch>
90    <key-style
91        latin:styleName="spaceKeyStyle"
92        latin:code="!code/key_space"
93        latin:keyActionFlags="noKeyPreview|enableLongPress" />
94    <!-- U+200C: ZERO WIDTH NON-JOINER
95         U+200D: ZERO WIDTH JOINER -->
96    <key-style
97        latin:styleName="zwnjKeyStyle"
98        latin:code="0x200C"
99        latin:keyIcon="!icon/zwnj_key"
100        latin:moreKeys="!icon/zwj_key|&#x200D;"
101        latin:keyLabelFlags="hasPopupHint"
102        latin:keyActionFlags="noKeyPreview" />
103    <key-style
104        latin:styleName="shortcutKeyStyle"
105        latin:code="!code/key_shortcut"
106        latin:keyIcon="!icon/shortcut_key"
107        latin:keyIconDisabled="!icon/shortcut_key_disabled"
108        latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
109        latin:altCode="!code/key_space"
110        latin:parentStyle="f1MoreKeysStyle" />
111    <key-style
112        latin:styleName="settingsKeyStyle"
113        latin:code="!code/key_settings"
114        latin:keyIcon="!icon/settings_key"
115        latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
116        latin:altCode="!code/key_space"
117        latin:backgroundType="functional" />
118    <key-style
119        latin:styleName="languageSwitchKeyStyle"
120        latin:code="!code/key_language_switch"
121        latin:keyIcon="!icon/language_switch_key"
122        latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
123        latin:altCode="!code/key_space" />
124    <key-style
125        latin:styleName="tabKeyStyle"
126        latin:code="!code/key_tab"
127        latin:keyIcon="!icon/tab_key"
128        latin:keyIconPreview="!icon/tab_key_preview"
129        latin:backgroundType="functional" />
130    <!-- Note: This key style is not for functional tab key. This is used for the tab key which is
131         laid out as normal letter key. -->
132    <key-style
133        latin:styleName="nonSpecialBackgroundTabKeyStyle"
134        latin:code="!code/key_tab"
135        latin:keyIcon="!icon/tab_key"
136        latin:keyIconPreview="!icon/tab_key_preview" />
137    <switch>
138        <!-- When this qwerty keyboard has no shortcut keys but shortcut key is enabled, then symbol
139             keyboard will have a shortcut key. That means we should use label_to_symbol_key label
140             and shortcut_for_label icon. -->
141        <case
142            latin:shortcutKeyEnabled="true"
143            latin:hasShortcutKey="false"
144        >
145            <key-style
146                latin:styleName="toSymbolKeyStyle"
147                latin:code="!code/key_switch_alpha_symbol"
148                latin:keyIcon="!icon/shortcut_for_label"
149                latin:keyLabel="!text/label_to_symbol_with_microphone_key"
150                latin:keyLabelFlags="withIconRight|preserveCase"
151                latin:keyActionFlags="noKeyPreview"
152                latin:backgroundType="functional" />
153        </case>
154        <default>
155            <key-style
156                latin:styleName="toSymbolKeyStyle"
157                latin:code="!code/key_switch_alpha_symbol"
158                latin:keyLabel="!text/label_to_symbol_key"
159                latin:keyLabelFlags="preserveCase"
160                latin:keyActionFlags="noKeyPreview"
161                latin:backgroundType="functional" />
162        </default>
163    </switch>
164    <key-style
165        latin:styleName="toAlphaKeyStyle"
166        latin:code="!code/key_switch_alpha_symbol"
167        latin:keyLabel="!text/label_to_alpha_key"
168        latin:keyLabelFlags="preserveCase"
169        latin:keyActionFlags="noKeyPreview"
170        latin:backgroundType="functional" />
171    <key-style
172        latin:styleName="toMoreSymbolKeyStyle"
173        latin:code="!code/key_shift"
174        latin:keyLabel="!text/label_to_more_symbol_key"
175        latin:keyActionFlags="noKeyPreview"
176        latin:backgroundType="functional" />
177    <key-style
178        latin:styleName="backFromMoreSymbolKeyStyle"
179        latin:code="!code/key_shift"
180        latin:keyLabel="!text/label_to_symbol_key"
181        latin:keyActionFlags="noKeyPreview"
182        latin:backgroundType="functional" />
183    <key-style
184        latin:styleName="punctuationKeyStyle"
185        latin:keyLabel="."
186        latin:keyLabelFlags="hasPopupHint"
187        latin:moreKeys="!text/more_keys_for_punctuation"
188        latin:backgroundType="functional" />
189</merge>
190