LatinIME/java/res/xml/kbd_key_styles.xml

242 lines
9.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2010, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<!-- Base key style for the key which may have settings or tab key as popup key. -->
<switch>
<case
latin:clobberSettingsKey="true"
>
<key-style
latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1"
latin:backgroundType="functional" />
</case>
<!-- clobberSettingsKey="false -->
<case
latin:hasSettingsKey="false"
>
<key-style
latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1_settings"
latin:backgroundType="functional" />
</case>
<!-- clobberSettingsKey="false" hasSettingsKey="true" -->
<case
latin:navigateAction="true"
>
<key-style
latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1_navigate"
latin:backgroundType="functional" />
</case>
<!-- clobberSettingsKey="false" and hasSettingsKey="true" navigateAction="false" -->
<default>
<key-style
latin:styleName="f1PopupStyle"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1"
latin:backgroundType="functional" />
</default>
</switch>
<!-- Functional key styles -->
<key-style
latin:styleName="shiftKeyStyle"
latin:code="@integer/key_shift"
latin:keyIcon="iconShiftKey"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="sticky" />
<key-style
latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete"
latin:keyIcon="iconDeleteKey"
latin:keyActionFlags="isRepeatable|noKeyPreview"
latin:backgroundType="functional" />
<!-- Return key style -->
<switch>
<case
latin:mode="im"
>
<!-- Smiley key. -->
<key-style
latin:styleName="returnKeyStyle"
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_smiley"
latin:maxMoreKeysColumn="5"
latin:backgroundType="functional" />
</case>
<case
latin:imeAction="actionGo"
>
<key-style
latin:styleName="returnKeyStyle"
latin:code="@integer/key_return"
latin:keyLabel="@string/label_go_key"
latin:keyLabelFlags="autoXScale"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="action" />
</case>
<case
latin:imeAction="actionNext"
>
<key-style
latin:styleName="returnKeyStyle"
latin:code="@integer/key_return"
latin:keyLabel="@string/label_next_key"
latin:keyLabelFlags="autoXScale"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="action" />
</case>
<case
latin:imeAction="actionDone"
>
<key-style
latin:styleName="returnKeyStyle"
latin:code="@integer/key_return"
latin:keyLabel="@string/label_done_key"
latin:keyLabelFlags="autoXScale"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="action" />
</case>
<case
latin:imeAction="actionSend"
>
<key-style
latin:styleName="returnKeyStyle"
latin:code="@integer/key_return"
latin:keyLabel="@string/label_send_key"
latin:keyLabelFlags="autoXScale"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="action" />
</case>
<case
latin:imeAction="actionSearch"
>
<key-style
latin:styleName="returnKeyStyle"
latin:code="@integer/key_return"
latin:keyIcon="iconSearchKey"
latin:keyLabelFlags="autoXScale"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="action" />
</case>
<default>
<key-style
latin:styleName="returnKeyStyle"
latin:code="@integer/key_return"
latin:keyIcon="iconReturnKey"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
</default>
</switch>
<key-style
latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
<key-style
latin:styleName="shortcutKeyStyle"
latin:code="@integer/key_shortcut"
latin:keyIcon="iconShortcutKey"
latin:keyIconDisabled="iconDisabledShortcutKey"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
latin:altCode="@integer/key_space"
latin:parentStyle="f1PopupStyle" />
<key-style
latin:styleName="settingsKeyStyle"
latin:code="@integer/key_settings"
latin:keyIcon="iconSettingsKey"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
latin:altCode="@integer/key_space"
latin:backgroundType="functional" />
<key-style
latin:styleName="tabKeyStyle"
latin:code="@integer/key_tab"
latin:keyIcon="iconTabKey"
latin:keyIconPreview="iconPreviewTabKey"
latin:backgroundType="functional" />
<!-- Note: This key style is not for functional tab key. This is used for the tab key which is
laid out as normal letter key. -->
<key-style
latin:styleName="nonSpecialBackgroundTabKeyStyle"
latin:code="@integer/key_tab"
latin:keyIcon="iconTabKey"
latin:keyIconPreview="iconPreviewTabKey" />
<switch>
<!-- When this qwerty keyboard has no shortcut keys but shortcut key is enabled, then symbol
keyboard will have a shortcut key. That means we should use
iconToSymbolKeyWithShortcutKey here. -->
<case
latin:shortcutKeyEnabled="true"
latin:hasShortcutKey="false"
>
<key-style
latin:styleName="toSymbolKeyStyle"
latin:code="@integer/key_switch_alpha_symbol"
latin:keyIcon="iconShortcutForLabel"
latin:keyLabel="@string/label_to_symbol_with_microphone_key"
latin:keyLabelFlags="withIconRight"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
</case>
<default>
<key-style
latin:styleName="toSymbolKeyStyle"
latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_symbol_key"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
</default>
</switch>
<key-style
latin:styleName="toAlphaKeyStyle"
latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_alpha_key"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
<key-style
latin:styleName="toMoreSymbolKeyStyle"
latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_more_symbol_key"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
<key-style
latin:styleName="backFromMoreSymbolKeyStyle"
latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_symbol_key"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
<key-style
latin:styleName="punctuationKeyStyle"
latin:keyLabel="."
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="@string/more_keys_for_punctuation"
latin:maxMoreKeysColumn="@integer/mini_keyboard_column_for_punctuation"
latin:backgroundType="functional" />
</merge>