Show settings and tab key accordingly

Instead of showing a tab key at the position of "period" key, this
change places a tab key on the left side of the space key or on the
mini popup keyboard of the mic/comma key accordingly.

Bug: 4340933
Change-Id: If3cbc6d0b36f74fbc9320d6f433c65c66051dc09
main
Tadashi G. Takaoka 2011-07-29 18:41:12 -07:00
parent 35e675b196
commit e00d44d0c8
10 changed files with 178 additions and 168 deletions

View File

@ -31,9 +31,7 @@
\u064b: ARABIC FATHATAN
\u064d: ARABIC KASRATAN -->
<string name="alternates_for_punctuation">"\u060c,\u061b,\u061f,!,:,-,/,\',\",\u0651,\u0652,\u064c,\u0640,\u064f,\u064e,\u0650,\u064b,\u064d"</string>
<string name="alternates_for_web_tab_punctuation">".,\u060c,\u061b,\u061f,!,:,-,/,\',\",\u0651,\u0652,\u064c,\u0640,\u064f,\u064e,\u0650,\u064b,\u064d"</string>
<integer name="popup_keyboard_column_for_punctuation">9</integer>
<integer name="popup_keyboard_column_for_web_punctuation">10</integer>
<string name="keyhintlabel_for_punctuation">\u064b</string>
<string name="keylabel_for_symbols_1">"١"</string>
<string name="keylabel_for_symbols_2">"٢"</string>
@ -62,8 +60,11 @@
<!-- \u066a: ARABIC PERCENT SIGN -->
<string name="keylabel_for_symbols_percent">\u066a</string>
<string name="alternates_for_comma">,</string>
<!-- @icon/5 is iconsSettingsKey -->
<string name="alternates_for_f1">"\\,,\@icon/5|\@integer/key_settings"</string>
<string name="alternates_for_f1">,</string>
<!-- @icon/5 is iconSettingsKey -->
<string name="alternates_for_f1_settings">\\,,\@icon/5|\@integer/key_settings</string>
<!-- @icon/10 is iconTabKey -->
<string name="alternates_for_f1_navigate">\\,,\@icon/10|\@integer/key_tab</string>
<string name="alternates_for_symbols_question">\?,¿</string>
<string name="alternates_for_symbols_semicolon">;</string>
<string name="alternates_for_symbols_percent">%,‰</string>

View File

@ -26,5 +26,4 @@
<string name="alternates_for_n">ñ,ń</string>
<string name="alternates_for_c">ç,ć,č</string>
<string name="alternates_for_punctuation">"\\,,\?,!,¿,¡,:,-,\',\",),(,/,;,+,&amp;,\@"</string>
<string name="alternates_for_web_tab_punctuation">".,\\,,\?,!,¿,¡,:,-,\',\",),(,/,;,+,&amp;,\@"</string>
</resources>

View File

@ -50,9 +50,7 @@
<string name="alternates_for_currency_general">¢,$,€,£,¥,₱</string>
<string name="alternates_for_smiley">":-)|:-) ,:-(|:-( ,;-)|;-) ,:-P|:-P ,=-O|=-O ,:-*|:-* ,:O|:O ,B-)|B-) ,:-$|:-$ ,:-!|:-! ,:-[|:-[ ,O:-)|O:-) ,:-\\\\\\\\|:-\\\\\\\\ ,:\'(|:\'( ,:-D|:-D "</string>
<string name="alternates_for_punctuation">"\\,,\?,!,:,-,\',\",(,),/,;,+,&amp;,\@"</string>
<string name="alternates_for_web_tab_punctuation">".,\\,,\?,!,:,-,\',\",(,),/,;,+,&amp;,\@"</string>
<integer name="popup_keyboard_column_for_punctuation">7</integer>
<integer name="popup_keyboard_column_for_web_punctuation">8</integer>
<string name="keyhintlabel_for_punctuation"></string>
<string name="keylabel_for_popular_domain">".com"</string>
<!-- popular web domains for the locale - most popular, displayed on the keyboard -->
@ -83,8 +81,11 @@
<string name="keylabel_for_symbols_semicolon">;</string>
<string name="keylabel_for_symbols_percent">%</string>
<string name="alternates_for_comma"></string>
<!-- @icon/5 is iconsSettingsKey -->
<string name="alternates_for_f1">\@icon/5|\@integer/key_settings</string>
<string name="alternates_for_f1"></string>
<!-- @icon/5 is iconSettingsKey -->
<string name="alternates_for_f1_settings">\@icon/5|\@integer/key_settings</string>
<!-- @icon/10 is iconTabKey -->
<string name="alternates_for_f1_navigate">\@icon/10|\@integer/key_tab</string>
<string name="alternates_for_symbols_question">¿</string>
<string name="alternates_for_symbols_semicolon"></string>
<string name="alternates_for_symbols_percent"></string>

View File

@ -25,38 +25,41 @@
<key-style
latin:styleName="functionalKeyStyle"
latin:isFunctional="true" />
<!-- Base key style for the key which may have settings key as popup key -->
<!-- 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:parentStyle="functionalKeyStyle" />
<key-style
latin:styleName="symbolsF1PopupStyle"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_f1"
latin:parentStyle="functionalKeyStyle" />
</case>
<!-- clobberSettingsKey="false -->
<case
latin:clobberSettingsKey="false"
latin:hasSettingsKey="true"
latin:hasSettingsKey="false"
>
<key-style
latin:styleName="f1PopupStyle"
latin:parentStyle="functionalKeyStyle" />
<key-style
latin:styleName="symbolsF1PopupStyle"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_f1_settings"
latin:parentStyle="functionalKeyStyle" />
</case>
<!-- clobberSettingsKey="false" and hasSettingsKey="false" -->
<default>
<!-- clobberSettingsKey="false" hasSettingsKey="true" -->
<case
latin:navigateAction="true"
>
<key-style
latin:styleName="f1PopupStyle"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="\@icon/5|\@integer/key_settings"
latin:popupCharacters="@string/alternates_for_f1_navigate"
latin:parentStyle="functionalKeyStyle" />
</case>
<!-- clobberSettingsKey="false" and hasSettingsKey="true" navigateAction="false" -->
<default>
<key-style
latin:styleName="symbolsF1PopupStyle"
latin:styleName="f1PopupStyle"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_f1"
latin:parentStyle="functionalKeyStyle" />
@ -225,29 +228,11 @@
</default>
</switch>
<key-style
latin:styleName="basePunctuationKeyStyle"
latin:styleName="punctuationKeyStyle"
latin:keyLabel="."
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="@integer/popup_keyboard_column_for_punctuation"
latin:parentStyle="functionalKeyStyle" />
<switch>
<case
latin:navigateAction="true"
>
<key-style
latin:styleName="punctuationKeyStyle"
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:maxPopupKeyboardColumn="@integer/popup_keyboard_column_for_web_punctuation"
latin:parentStyle="tabKeyStyle" />
</case>
<default>
<key-style
latin:styleName="punctuationKeyStyle"
latin:parentStyle="basePunctuationKeyStyle" />
</default>
</switch>
</merge>

View File

@ -23,7 +23,8 @@
>
<switch>
<case
latin:hasSettingsKey="true"
latin:hasSettingsKey="false"
latin:navigateAction="false"
>
<switch>
<case
@ -31,7 +32,6 @@
>
<Key
latin:keyLabel="/"
latin:keyWidth="9.2%p"
latin:keyStyle="f1PopupStyle" />
</case>
<case
@ -39,38 +39,23 @@
>
<Key
latin:keyLabel="\@"
latin:keyWidth="9.2%p"
latin:keyStyle="f1PopupStyle" />
</case>
<case
latin:hasShortcutKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle" />
</case>
<!-- latin:hasShortcutKey="false" -->
<default>
<switch>
<case
latin:hasShortcutKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- latin:hasShortcutKey="false" -->
<case
latin:navigateAction="true"
>
<Key
latin:keyLabel="."
latin:keyWidth="9.2%p"
latin:keyStyle="f1PopupStyle" />
</case>
<default>
<Key
latin:keyLabel="@string/keylabel_for_comma"
latin:keyWidth="9.2%p"
latin:keyStyle="f1PopupStyle" />
</default>
</switch>
<Key
latin:keyLabel="@string/keylabel_for_comma"
latin:keyStyle="f1PopupStyle" />
</default>
</switch>
</case>
<!-- hasSettingsKey="false" -->
<!-- hasSettingsKey="true" or navigateAction="true" -->
<default>
<switch>
<case
@ -78,6 +63,7 @@
>
<Key
latin:keyLabel="/"
latin:keyWidth="9.2%p"
latin:keyStyle="f1PopupStyle" />
</case>
<case
@ -85,30 +71,22 @@
>
<Key
latin:keyLabel="\@"
latin:keyWidth="9.2%p"
latin:keyStyle="f1PopupStyle" />
</case>
<case
latin:hasShortcutKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- hasShortcutKey="false" -->
<default>
<switch>
<case
latin:hasShortcutKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle" />
</case>
<!-- latin:hasShortcutKey="false" -->
<case
latin:navigateAction="true"
>
<Key
latin:keyLabel="."
latin:keyStyle="f1PopupStyle" />
</case>
<default>
<Key
latin:keyLabel="@string/keylabel_for_comma"
latin:keyStyle="f1PopupStyle" />
</default>
</switch>
<Key
latin:keyLabel="@string/keylabel_for_comma"
latin:keyWidth="9.2%p"
latin:keyStyle="f1PopupStyle" />
</default>
</switch>
</default>

View File

@ -26,25 +26,9 @@
>
<switch>
<case
latin:hasSettingsKey="true"
latin:hasSettingsKey="false"
latin:navigateAction="false"
>
<Key
latin:keyStyle="toSymbolKeyStyle"
latin:keyWidth="13.75%p" />
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="9.2%p" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyStyle="punctuationKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- latin:hasSettingsKey="false" -->
<default>
<Key
latin:keyStyle="toSymbolKeyStyle"
latin:keyWidth="15%p" />
@ -55,6 +39,22 @@
latin:keyWidth="50%p" />
<Key
latin:keyStyle="punctuationKeyStyle" />
</case>
<!-- hasSettingsKey="true" or navigateAction="true" -->
<default>
<Key
latin:keyStyle="toSymbolKeyStyle"
latin:keyWidth="13.75%p" />
<include
latin:keyboardLayout="@xml/kbd_settings_or_tab" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyStyle="punctuationKeyStyle"
latin:keyWidth="9.2%p" />
</default>
</switch>
<switch>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2011, 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"
>
<switch>
<case
latin:hasSettingsKey="true"
>
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- hasSettingsKey="false" -->
<case
latin:navigateAction="true"
>
<Key
latin:keyStyle="tabKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- hasSettingsKey="false" and navigateAction="false" -->
<default>
<!-- No key. -->
</default>
</switch>
</merge>

View File

@ -23,8 +23,26 @@
>
<switch>
<case
latin:hasSettingsKey="true"
latin:hasSettingsKey="false"
latin:navigateAction="false"
>
<switch>
<case
latin:hasShortcutKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle" />
</case>
<!-- latin:hasShortcutKey="false" -->
<default>
<Key
latin:keyLabel="@string/keylabel_for_f1"
latin:keyStyle="f1PopupStyle" />
</default>
</switch>
</case>
<!-- hasSettingsKey="true" or navigateAction="true" -->
<default>
<switch>
<case
latin:hasShortcutKey="true"
@ -38,24 +56,7 @@
<Key
latin:keyLabel="@string/keylabel_for_f1"
latin:keyWidth="9.2%p"
latin:keyStyle="symbolsF1PopupStyle" />
</default>
</switch>
</case>
<!-- hasSettingsKey="false" -->
<default>
<switch>
<case
latin:hasShortcutKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle" />
</case>
<!-- latin:hasShortcutKey="false" -->
<default>
<Key
latin:keyLabel="@string/keylabel_for_f1"
latin:keyStyle="symbolsF1PopupStyle" />
latin:keyStyle="f1PopupStyle" />
</default>
</switch>
</default>

View File

@ -26,25 +26,9 @@
>
<switch>
<case
latin:hasSettingsKey="true"
latin:hasSettingsKey="false"
latin:navigateAction="false"
>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="13.75%p" />
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="9.2%p" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyStyle="basePunctuationKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- latin:hasSettingsKey="false" -->
<default>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="15%p" />
@ -54,7 +38,23 @@
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="50%p" />
<Key
latin:keyStyle="basePunctuationKeyStyle" />
latin:keyStyle="punctuationKeyStyle" />
</case>
<!-- hasSettingsKey="true" or navigateAction="true" -->
<default>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="13.75%p" />
<include
latin:keyboardLayout="@xml/kbd_settings_or_tab" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyStyle="punctuationKeyStyle"
latin:keyWidth="9.2%p" />
</default>
</switch>
<switch>

View File

@ -26,29 +26,9 @@
>
<switch>
<case
latin:hasSettingsKey="true"
latin:hasSettingsKey="false"
latin:navigateAction="false"
>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="13.75%p" />
<Key
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="9.2%p" />
<Key
latin:keyLabel="„"
latin:popupCharacters="“,”,„,‟,«,»,,,,"
latin:keyWidth="9.2%p"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyLabel="…"
latin:keyWidth="9.2%p"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
</case>
<!-- latin:hasSettingsKey="false" -->
<default>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="15%p" />
@ -62,6 +42,26 @@
<Key
latin:keyLabel="…"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
</case>
<!-- hasSettingsKey="true" or navigateAction="true" -->
<default>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="13.75%p" />
<include
latin:keyboardLayout="@xml/kbd_settings_or_tab" />
<Key
latin:keyLabel="„"
latin:popupCharacters="“,”,„,‟,«,»,,,,"
latin:keyWidth="9.2%p"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyLabel="…"
latin:keyWidth="9.2%p"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
</default>
</switch>
<switch>