am 4e854767: Merge "Consolidate keyIcon and code with keyLabel attribute"

* commit '4e85476740104ae4b91c3d22df2fb0ee4ecd5c5b':
  Consolidate keyIcon and code with keyLabel attribute
main
Tadashi G. Takaoka 2014-02-07 01:56:40 -08:00 committed by Android Git Automerger
commit e03aef8f1d
36 changed files with 156 additions and 274 deletions

View File

@ -236,11 +236,6 @@
</declare-styleable> </declare-styleable>
<declare-styleable name="Keyboard_Key"> <declare-styleable name="Keyboard_Key">
<!-- TODO: Remove code attribute and consolidate with keySpec. -->
<!-- The unicode value that this key outputs.
Code value represented in hexadecimal prefixed with "0x" or code value reference using
"!code/<code_name>" notation. -->
<attr name="code" format="string" />
<!-- The alternate unicode value that this key outputs while typing. <!-- The alternate unicode value that this key outputs while typing.
Code value represented in hexadecimal prefixed with "0x" or code value reference using Code value represented in hexadecimal prefixed with "0x" or code value reference using
"!code/<code_name>" notation. --> "!code/<code_name>" notation. -->
@ -314,9 +309,6 @@
<!-- If true, disable additionalMoreKeys. --> <!-- If true, disable additionalMoreKeys. -->
<flag name="disableAdditionalMoreKeys" value="0x80000000" /> <flag name="disableAdditionalMoreKeys" value="0x80000000" />
</attr> </attr>
<!-- TODO: Remove keyIcon attribute and consolidate with keySpec. -->
<!-- The icon to display on the key instead of the label. -->
<attr name="keyIcon" format="string" />
<!-- The icon for disabled key --> <!-- The icon for disabled key -->
<attr name="keyIconDisabled" format="string" /> <attr name="keyIconDisabled" format="string" />
<!-- The icon to show in the popup preview. --> <!-- The icon to show in the popup preview. -->

View File

@ -39,7 +39,6 @@
<!-- Base style for shift key. A single space is used for dummy label in moreKeys. --> <!-- Base style for shift key. A single space is used for dummy label in moreKeys. -->
<key-style <key-style
latin:styleName="baseForShiftKeyStyle" latin:styleName="baseForShiftKeyStyle"
latin:code="!code/key_shift"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:keyLabelFlags="preserveCase" latin:keyLabelFlags="preserveCase"
latin:moreKeys="!noPanelAutoMoreKey!, |!code/key_capslock" /> latin:moreKeys="!noPanelAutoMoreKey!, |!code/key_capslock" />
@ -49,7 +48,7 @@
> >
<key-style <key-style
latin:styleName="shiftKeyStyle" latin:styleName="shiftKeyStyle"
latin:keyIcon="!icon/shift_key_shifted" latin:keyLabel="!icon/shift_key_shifted|!code/key_shift"
latin:backgroundType="stickyOff" latin:backgroundType="stickyOff"
latin:parentStyle="baseForShiftKeyStyle" /> latin:parentStyle="baseForShiftKeyStyle" />
</case> </case>
@ -58,71 +57,56 @@
> >
<key-style <key-style
latin:styleName="shiftKeyStyle" latin:styleName="shiftKeyStyle"
latin:keyIcon="!icon/shift_key_shifted" latin:keyLabel="!icon/shift_key_shifted|!code/key_shift"
latin:backgroundType="stickyOn" latin:backgroundType="stickyOn"
latin:parentStyle="baseForShiftKeyStyle" /> latin:parentStyle="baseForShiftKeyStyle" />
</case> </case>
<default> <default>
<key-style <key-style
latin:styleName="shiftKeyStyle" latin:styleName="shiftKeyStyle"
latin:keyIcon="!icon/shift_key" latin:keyLabel="!icon/shift_key|!code/key_shift"
latin:backgroundType="stickyOff" latin:backgroundType="stickyOff"
latin:parentStyle="baseForShiftKeyStyle" /> latin:parentStyle="baseForShiftKeyStyle" />
</default> </default>
</switch> </switch>
<key-style <key-style
latin:styleName="deleteKeyStyle" latin:styleName="deleteKeyStyle"
latin:code="!code/key_delete" latin:keyLabel="!icon/delete_key|!code/key_delete"
latin:keyIcon="!icon/delete_key"
latin:keyActionFlags="isRepeatable|noKeyPreview" latin:keyActionFlags="isRepeatable|noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<include <include
latin:keyboardLayout="@xml/key_styles_enter" /> latin:keyboardLayout="@xml/key_styles_enter" />
<!-- Override defaultEnterKeyStyle in key_styles_enter.xml -->
<key-style
latin:styleName="defaultEnterKeyStyle"
latin:code="!code/key_enter"
latin:keyIcon="!icon/enter_key"
latin:keyLabelFlags="preserveCase|autoXScale|followKeyLargeLabelRatio"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional"
latin:parentStyle="navigateMoreKeysStyle" />
<key-style <key-style
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="!code/key_space" latin:keyLabel=" |!code/key_space"
latin:keyActionFlags="noKeyPreview|enableLongPress" /> latin:keyActionFlags="noKeyPreview|enableLongPress" />
<!-- U+200C: ZERO WIDTH NON-JOINER <!-- U+200C: ZERO WIDTH NON-JOINER
U+200D: ZERO WIDTH JOINER --> U+200D: ZERO WIDTH JOINER -->
<key-style <key-style
latin:styleName="zwnjKeyStyle" latin:styleName="zwnjKeyStyle"
latin:code="0x200C" latin:keyLabel="!icon/zwnj_key|&#x200C;"
latin:keyIcon="!icon/zwnj_key"
latin:moreKeys="!icon/zwj_key|&#x200D;" latin:moreKeys="!icon/zwj_key|&#x200D;"
latin:keyLabelFlags="hasPopupHint" latin:keyLabelFlags="hasPopupHint"
latin:keyActionFlags="noKeyPreview" /> latin:keyActionFlags="noKeyPreview" />
<key-style <key-style
latin:styleName="shortcutKeyStyle" latin:styleName="shortcutKeyStyle"
latin:code="!code/key_shortcut" latin:keyLabel="!icon/shortcut_key|!code/key_shortcut"
latin:keyIcon="!icon/shortcut_key"
latin:keyIconDisabled="!icon/shortcut_key_disabled" latin:keyIconDisabled="!icon/shortcut_key_disabled"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="languageSwitchKeyStyle" latin:styleName="languageSwitchKeyStyle"
latin:code="!code/key_language_switch" latin:keyLabel="!icon/language_switch_key|!code/key_language_switch"
latin:keyIcon="!icon/language_switch_key"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress" latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
latin:altCode="!code/key_space" /> latin:altCode="!code/key_space" />
<key-style <key-style
latin:styleName="emojiKeyStyle" latin:styleName="emojiKeyStyle"
latin:code="!code/key_emoji" latin:keyLabel="!icon/emoji_key|!code/key_emoji"
latin:keyIcon="!icon/emoji_key"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="settingsKeyStyle" latin:styleName="settingsKeyStyle"
latin:code="!code/key_settings" latin:keyLabel="!icon/settings_key|!code/key_settings"
latin:keyIcon="!icon/settings_key"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<switch> <switch>
@ -132,8 +116,7 @@
> >
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="!code/key_action_previous" latin:keyLabel="!icon/tab_key|!code/key_action_previous"
latin:keyIcon="!icon/tab_key"
latin:keyIconPreview="!icon/tab_key_preview" latin:keyIconPreview="!icon/tab_key_preview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
</case> </case>
@ -143,16 +126,14 @@
> >
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="!code/key_action_next" latin:keyLabel="!icon/tab_key|!code/key_action_next"
latin:keyIcon="!icon/tab_key"
latin:keyIconPreview="!icon/tab_key_preview" latin:keyIconPreview="!icon/tab_key_preview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
</case> </case>
<default> <default>
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="!code/key_tab" latin:keyLabel="!icon/tab_key|!code/key_tab"
latin:keyIcon="!icon/tab_key"
latin:keyIconPreview="!icon/tab_key_preview" latin:keyIconPreview="!icon/tab_key_preview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
</default> </default>
@ -164,23 +145,19 @@
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toSymbolKeyStyle" latin:styleName="toSymbolKeyStyle"
latin:code="!code/key_switch_alpha_symbol" latin:keyLabel="!text/label_to_symbol_key|!code/key_switch_alpha_symbol"
latin:keyLabel="!text/label_to_symbol_key"
latin:parentStyle="baseForLayoutSwitchKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style <key-style
latin:styleName="toAlphaKeyStyle" latin:styleName="toAlphaKeyStyle"
latin:code="!code/key_switch_alpha_symbol" latin:keyLabel="!text/label_to_alpha_key|!code/key_switch_alpha_symbol"
latin:keyLabel="!text/label_to_alpha_key"
latin:parentStyle="baseForLayoutSwitchKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style <key-style
latin:styleName="toMoreSymbolKeyStyle" latin:styleName="toMoreSymbolKeyStyle"
latin:code="!code/key_shift" latin:keyLabel="!text/label_to_more_symbol_for_tablet_key|!code/key_shift"
latin:keyLabel="!text/label_to_more_symbol_for_tablet_key"
latin:parentStyle="baseForLayoutSwitchKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style <key-style
latin:styleName="backFromMoreSymbolKeyStyle" latin:styleName="backFromMoreSymbolKeyStyle"
latin:code="!code/key_shift" latin:keyLabel="!text/label_to_symbol_key|!code/key_shift"
latin:keyLabel="!text/label_to_symbol_key"
latin:parentStyle="baseForLayoutSwitchKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style <key-style
latin:styleName="comKeyStyle" latin:styleName="comKeyStyle"

View File

@ -99,22 +99,11 @@
<!-- Enter key style --> <!-- Enter key style -->
<key-style <key-style
latin:styleName="defaultEnterKeyStyle" latin:styleName="defaultEnterKeyStyle"
latin:code="!code/key_enter" latin:keyLabel="!icon/enter_key|!code/key_enter"
latin:keyIcon="!icon/enter_key"
latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio" latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" latin:backgroundType="functional"
latin:parentStyle="navigateMoreKeysStyle" /> latin:parentStyle="navigateMoreKeysStyle" />
<key-style
latin:styleName="shiftEnterKeyStyle"
latin:code="!code/key_shift_enter"
latin:parentStyle="defaultEnterKeyStyle" />
<key-style
latin:styleName="defaultActionEnterKeyStyle"
latin:code="!code/key_enter"
latin:keyIcon="!icon/undefined"
latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
<switch> <switch>
<!-- Shift + Enter in textMultiLine field. --> <!-- Shift + Enter in textMultiLine field. -->
<case <case
@ -123,63 +112,72 @@
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:parentStyle="shiftEnterKeyStyle" /> latin:keyLabel="!text/label_go_key|!code/key_shift_enter"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionGo" latin:imeAction="actionGo"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_go_key" latin:keyLabel="!text/label_go_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionNext" latin:imeAction="actionNext"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_next_key" latin:keyLabel="!text/label_next_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionPrevious" latin:imeAction="actionPrevious"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_previous_key" latin:keyLabel="!text/label_previous_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionDone" latin:imeAction="actionDone"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_done_key" latin:keyLabel="!text/label_done_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionSend" latin:imeAction="actionSend"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_send_key" latin:keyLabel="!text/label_send_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionSearch" latin:imeAction="actionSearch"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyIcon="!icon/search_key" latin:keyLabel="!icon/search_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionCustomLabel" latin:imeAction="actionCustomLabel"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="dummy_label|!code/key_enter"
latin:keyLabelFlags="fromCustomActionLabel" latin:keyLabelFlags="fromCustomActionLabel"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<!-- imeAction is either actionNone or actionUnspecified. --> <!-- imeAction is either actionNone or actionUnspecified. -->
<default> <default>

View File

@ -28,7 +28,6 @@
<!-- U+25CC: "◌" DOTTED CIRCLE <!-- U+25CC: "◌" DOTTED CIRCLE
U+0902: "ं" DEVANAGARI SIGN ANUSVARA --> U+0902: "ं" DEVANAGARI SIGN ANUSVARA -->
<Key <Key
latin:keyLabel="&#x25CC;&#x0902;" latin:keyLabel="&#x25CC;&#x0902;|&#x0902;"
latin:code="0x0902"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -44,7 +44,6 @@
U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU --> U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU -->
<Key <Key
latin:keyStyle="moreKeysDevanagariSignCandrabindu" latin:keyStyle="moreKeysDevanagariSignCandrabindu"
latin:keyLabel="&#x25CC;&#x0901;" latin:keyLabel="&#x25CC;&#x0901;|&#x0901;"
latin:code="0x0901"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -46,7 +46,6 @@
U+093C: "़" DEVANAGARI SIGN NUKTA --> U+093C: "़" DEVANAGARI SIGN NUKTA -->
<Key <Key
latin:keyStyle="moreKeysDevanagariSignNukta" latin:keyStyle="moreKeysDevanagariSignNukta"
latin:keyLabel="&#x25CC;&#x093C;" latin:keyLabel="&#x25CC;&#x093C;|&#x093C;"
latin:code="0x093C"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -28,7 +28,6 @@
<!-- U+25CC: "◌" DOTTED CIRCLE <!-- U+25CC: "◌" DOTTED CIRCLE
U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O --> U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O -->
<Key <Key
latin:keyLabel="&#x25CC;&#x0949;" latin:keyLabel="&#x25CC;&#x0949;|&#x0949;"
latin:code="0x0949"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -52,7 +52,6 @@
U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R --> U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R -->
<Key <Key
latin:keyStyle="moreKeysDevanagariVowelSignVocalicR" latin:keyStyle="moreKeysDevanagariVowelSignVocalicR"
latin:keyLabel="&#x25CC;&#x0943;" latin:keyLabel="&#x25CC;&#x0943;|&#x0943;"
latin:code="0x0943"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -42,7 +42,6 @@
<!-- Base style for shift key. A single space is used for dummy label in moreKeys. --> <!-- Base style for shift key. A single space is used for dummy label in moreKeys. -->
<key-style <key-style
latin:styleName="baseForShiftKeyStyle" latin:styleName="baseForShiftKeyStyle"
latin:code="!code/key_shift"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:keyLabelFlags="preserveCase" latin:keyLabelFlags="preserveCase"
latin:moreKeys="!noPanelAutoMoreKey!, |!code/key_capslock" /> latin:moreKeys="!noPanelAutoMoreKey!, |!code/key_capslock" />
@ -52,7 +51,7 @@
> >
<key-style <key-style
latin:styleName="shiftKeyStyle" latin:styleName="shiftKeyStyle"
latin:keyIcon="!icon/shift_key_shifted" latin:keyLabel="!icon/shift_key_shifted|!code/key_shift"
latin:backgroundType="stickyOff" latin:backgroundType="stickyOff"
latin:parentStyle="baseForShiftKeyStyle" /> latin:parentStyle="baseForShiftKeyStyle" />
</case> </case>
@ -61,99 +60,70 @@
> >
<key-style <key-style
latin:styleName="shiftKeyStyle" latin:styleName="shiftKeyStyle"
latin:keyIcon="!icon/shift_key_shifted" latin:keyLabel="!icon/shift_key_shifted|!code/key_shift"
latin:backgroundType="stickyOn" latin:backgroundType="stickyOn"
latin:parentStyle="baseForShiftKeyStyle" /> latin:parentStyle="baseForShiftKeyStyle" />
</case> </case>
<default> <default>
<key-style <key-style
latin:styleName="shiftKeyStyle" latin:styleName="shiftKeyStyle"
latin:keyIcon="!icon/shift_key" latin:keyLabel="!icon/shift_key|!code/key_shift"
latin:backgroundType="stickyOff" latin:backgroundType="stickyOff"
latin:parentStyle="baseForShiftKeyStyle" /> latin:parentStyle="baseForShiftKeyStyle" />
</default> </default>
</switch> </switch>
<key-style <key-style
latin:styleName="deleteKeyStyle" latin:styleName="deleteKeyStyle"
latin:code="!code/key_delete" latin:keyLabel="!icon/delete_key|!code/key_delete"
latin:keyIcon="!icon/delete_key"
latin:keyActionFlags="isRepeatable|noKeyPreview" latin:keyActionFlags="isRepeatable|noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<include <include
latin:keyboardLayout="@xml/key_styles_enter" /> latin:keyboardLayout="@xml/key_styles_enter" />
<key-style <key-style
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="!code/key_space" latin:keyLabel=" |!code/key_space"
latin:keyActionFlags="noKeyPreview|enableLongPress" /> latin:keyActionFlags="noKeyPreview|enableLongPress" />
<!-- U+200C: ZERO WIDTH NON-JOINER <!-- U+200C: ZERO WIDTH NON-JOINER
U+200D: ZERO WIDTH JOINER --> U+200D: ZERO WIDTH JOINER -->
<key-style <key-style
latin:styleName="zwnjKeyStyle" latin:styleName="zwnjKeyStyle"
latin:code="0x200C" latin:keyLabel="!icon/zwnj_key|&#x200C;"
latin:keyIcon="!icon/zwnj_key"
latin:moreKeys="!icon/zwj_key|&#x200D;" latin:moreKeys="!icon/zwj_key|&#x200D;"
latin:keyLabelFlags="hasPopupHint" latin:keyLabelFlags="hasPopupHint"
latin:keyActionFlags="noKeyPreview" /> latin:keyActionFlags="noKeyPreview" />
<key-style <key-style
latin:styleName="shortcutKeyStyle" latin:styleName="shortcutKeyStyle"
latin:code="!code/key_shortcut" latin:keyLabel="!icon/shortcut_key|!code/key_shortcut"
latin:keyIcon="!icon/shortcut_key"
latin:keyIconDisabled="!icon/shortcut_key_disabled" latin:keyIconDisabled="!icon/shortcut_key_disabled"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping" latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
latin:altCode="!code/key_space" latin:altCode="!code/key_space"
latin:parentStyle="f1MoreKeysStyle" /> latin:parentStyle="f1MoreKeysStyle" />
<key-style <key-style
latin:styleName="settingsKeyStyle" latin:styleName="settingsKeyStyle"
latin:code="!code/key_settings" latin:keyLabel="!icon/settings_key|!code/key_settings"
latin:keyIcon="!icon/settings_key"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping" latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
latin:altCode="!code/key_space" latin:altCode="!code/key_space"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="languageSwitchKeyStyle" latin:styleName="languageSwitchKeyStyle"
latin:code="!code/key_language_switch" latin:keyLabel="!icon/language_switch_key|!code/key_language_switch"
latin:keyIcon="!icon/language_switch_key"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress" latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
latin:altCode="!code/key_space" /> latin:altCode="!code/key_space" />
<key-style <key-style
latin:styleName="emojiKeyStyle" latin:styleName="emojiKeyStyle"
latin:code="!code/key_emoji" latin:keyLabel="!icon/emoji_key|!code/key_emoji"
latin:keyIcon="!icon/emoji_key"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<!-- Overriding EnterKeyStyle here -->
<switch>
<!-- Shift + Enter in textMultiLine field. -->
<case
latin:isMultiLine="true"
latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
>
<key-style
latin:styleName="enterKeyStyle"
latin:parentStyle="shiftEnterKeyStyle" />
</case>
<!-- Smiley in textShortMessage field.
Overrides common enter key style. -->
<case
latin:mode="im"
>
<key-style
latin:styleName="enterKeyStyle"
latin:parentStyle="emojiKeyStyle" />
</case>
</switch>
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="!code/key_tab" latin:keyLabel="!icon/tab_key|!code/key_tab"
latin:keyIcon="!icon/tab_key"
latin:keyIconPreview="!icon/tab_key_preview" latin:keyIconPreview="!icon/tab_key_preview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<!-- Note: This key style is not for functional tab key. This is used for the tab key which is <!-- 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. --> laid out as normal letter key. -->
<key-style <key-style
latin:styleName="nonSpecialBackgroundTabKeyStyle" latin:styleName="nonSpecialBackgroundTabKeyStyle"
latin:code="!code/key_tab" latin:keyLabel="!icon/tab_key|!code/key_tab"
latin:keyIcon="!icon/tab_key"
latin:keyIconPreview="!icon/tab_key_preview" /> latin:keyIconPreview="!icon/tab_key_preview" />
<key-style <key-style
latin:styleName="baseForLayoutSwitchKeyStyle" latin:styleName="baseForLayoutSwitchKeyStyle"
@ -161,27 +131,21 @@
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="baseForToSymbolKeyStyle" latin:styleName="toSymbolKeyStyle"
latin:keyLabel="!text/label_to_symbol_key" latin:keyLabel="!text/label_to_symbol_key|!code/key_switch_alpha_symbol"
latin:parentStyle="baseForLayoutSwitchKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style
latin:styleName="toSymbolKeyStyle"
latin:code="!code/key_switch_alpha_symbol"
latin:parentStyle="baseForToSymbolKeyStyle" />
<key-style <key-style
latin:styleName="toAlphaKeyStyle" latin:styleName="toAlphaKeyStyle"
latin:code="!code/key_switch_alpha_symbol" latin:keyLabel="!text/label_to_alpha_key|!code/key_switch_alpha_symbol"
latin:keyLabel="!text/label_to_alpha_key"
latin:parentStyle="baseForLayoutSwitchKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style <key-style
latin:styleName="toMoreSymbolKeyStyle" latin:styleName="toMoreSymbolKeyStyle"
latin:code="!code/key_shift" latin:keyLabel="!text/label_to_more_symbol_key|!code/key_shift"
latin:keyLabel="!text/label_to_more_symbol_key"
latin:parentStyle="baseForLayoutSwitchKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style <key-style
latin:styleName="backFromMoreSymbolKeyStyle" latin:styleName="backFromMoreSymbolKeyStyle"
latin:code="!code/key_shift" latin:keyLabel="!text/label_to_symbol_key|!code/key_shift"
latin:parentStyle="baseForToSymbolKeyStyle" /> latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style <key-style
latin:styleName="comKeyStyle" latin:styleName="comKeyStyle"
latin:keyLabel="!text/keylabel_for_popular_domain|!text/keylabel_for_popular_domain" latin:keyLabel="!text/keylabel_for_popular_domain|!text/keylabel_for_popular_domain"

View File

@ -255,21 +255,13 @@
<!-- Enter key style --> <!-- Enter key style -->
<key-style <key-style
latin:styleName="defaultEnterKeyStyle" latin:styleName="defaultEnterKeyStyle"
latin:code="!code/key_enter"
latin:keyIcon="!icon/enter_key"
latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio" latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" latin:backgroundType="functional"
latin:parentStyle="navigateMoreKeysStyle" /> latin:parentStyle="navigateMoreKeysStyle" />
<key-style <key-style
latin:styleName="shiftEnterKeyStyle" latin:styleName="shiftEnterKeyStyle"
latin:code="!code/key_shift_enter" latin:keyLabel="!icon/enter_key|!code/key_shift_enter"
latin:parentStyle="defaultEnterKeyStyle" />
<key-style
latin:styleName="defaultActionEnterKeyStyle"
latin:code="!code/key_enter"
latin:keyIcon="!icon/undefined"
latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" /> latin:parentStyle="defaultEnterKeyStyle" />
<switch> <switch>
<!-- Shift + Enter in textMultiLine field. --> <!-- Shift + Enter in textMultiLine field. -->
@ -281,66 +273,84 @@
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:parentStyle="shiftEnterKeyStyle" /> latin:parentStyle="shiftEnterKeyStyle" />
</case> </case>
<!-- Smiley in textShortMessage field.
This <case> should be after Shift + Enter <case> and before any of action <case>. -->
<case
latin:mode="im"
>
<key-style
latin:styleName="enterKeyStyle"
latin:parentStyle="emojiKeyStyle" />
</case>
<case <case
latin:imeAction="actionGo" latin:imeAction="actionGo"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_go_key" latin:keyLabel="!text/label_go_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionNext" latin:imeAction="actionNext"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_next_key" latin:keyLabel="!text/label_next_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionPrevious" latin:imeAction="actionPrevious"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_previous_key" latin:keyLabel="!text/label_previous_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionDone" latin:imeAction="actionDone"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_done_key" latin:keyLabel="!text/label_done_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionSend" latin:imeAction="actionSend"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!text/label_send_key" latin:keyLabel="!text/label_send_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionSearch" latin:imeAction="actionSearch"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyIcon="!icon/search_key" latin:keyLabel="!icon/search_key|!code/key_enter"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<case <case
latin:imeAction="actionCustomLabel" latin:imeAction="actionCustomLabel"
> >
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="dummy_label|!code/key_enter"
latin:keyLabelFlags="fromCustomActionLabel" latin:keyLabelFlags="fromCustomActionLabel"
latin:parentStyle="defaultActionEnterKeyStyle" /> latin:backgroundType="action"
latin:parentStyle="defaultEnterKeyStyle" />
</case> </case>
<!-- imeAction is either actionNone or actionUnspecified. --> <!-- imeAction is either actionNone or actionUnspecified. -->
<default> <default>
<key-style <key-style
latin:styleName="enterKeyStyle" latin:styleName="enterKeyStyle"
latin:keyLabel="!icon/enter_key|!code/key_enter"
latin:parentStyle="defaultEnterKeyStyle" /> latin:parentStyle="defaultEnterKeyStyle" />
</default> </default>
</switch> </switch>

View File

@ -89,36 +89,28 @@
latin:keyLabel="9" latin:keyLabel="9"
latin:keyHintLabel="WXYZ" latin:keyHintLabel="WXYZ"
latin:parentStyle="numberKeyStyle" /> latin:parentStyle="numberKeyStyle" />
<!-- U+002A: "*" ASTERISK <!-- U+FF0A: "" FULLWIDTH ASTERISK -->
U+FF0A: "" FULLWIDTH ASTERISK -->
<key-style <key-style
latin:styleName="numStarKeyStyle" latin:styleName="numStarKeyStyle"
latin:code="0x002A" latin:keyLabel="&#xFF0A;|*"
latin:keyLabel="&#xFF0A;"
latin:parentStyle="numKeyStyle" /> latin:parentStyle="numKeyStyle" />
<!-- Only for non-tablet device --> <!-- Only for non-tablet device -->
<key-style <key-style
latin:styleName="numPhoneToSymbolKeyStyle" latin:styleName="numPhoneToSymbolKeyStyle"
latin:code="!code/key_switch_alpha_symbol" latin:keyLabel="!text/label_to_phone_symbols_key|!code/key_switch_alpha_symbol"
latin:keyLabel="!text/label_to_phone_symbols_key"
latin:parentStyle="numModeKeyStyle" /> latin:parentStyle="numModeKeyStyle" />
<key-style <key-style
latin:styleName="numPhoneToNumericKeyStyle" latin:styleName="numPhoneToNumericKeyStyle"
latin:code="!code/key_switch_alpha_symbol" latin:keyLabel="!text/label_to_phone_numeric_key|!code/key_switch_alpha_symbol"
latin:keyLabel="!text/label_to_phone_numeric_key"
latin:parentStyle="numModeKeyStyle" /> latin:parentStyle="numModeKeyStyle" />
<!-- U+002C: "," COMMA -->
<key-style <key-style
latin:styleName="numPauseKeyStyle" latin:styleName="numPauseKeyStyle"
latin:code="0x002C" latin:keyLabel="!text/label_pause_key|,"
latin:keyLabel="!text/label_pause_key"
latin:keyLabelFlags="followKeyHintLabelRatio|autoXScale" latin:keyLabelFlags="followKeyHintLabelRatio|autoXScale"
latin:parentStyle="numKeyBaseStyle" /> latin:parentStyle="numKeyBaseStyle" />
<!-- U+003B: ";" SEMICOLON -->
<key-style <key-style
latin:styleName="numWaitKeyStyle" latin:styleName="numWaitKeyStyle"
latin:code="0x003B" latin:keyLabel="!text/label_wait_key|;"
latin:keyLabel="!text/label_wait_key"
latin:keyLabelFlags="followKeyHintLabelRatio|autoXScale" latin:keyLabelFlags="followKeyHintLabelRatio|autoXScale"
latin:parentStyle="numKeyBaseStyle" /> latin:parentStyle="numKeyBaseStyle" />
<key-style <key-style
@ -127,15 +119,13 @@
latin:parentStyle="tabKeyStyle" /> latin:parentStyle="tabKeyStyle" />
<key-style <key-style
latin:styleName="numSpaceKeyStyle" latin:styleName="numSpaceKeyStyle"
latin:code="!code/key_space" latin:keyLabel="!icon/space_key_for_number_layout|!code/key_space"
latin:keyIcon="!icon/space_key_for_number_layout"
latin:keyActionFlags="enableLongPress" latin:keyActionFlags="enableLongPress"
latin:parentStyle="numKeyBaseStyle" /> latin:parentStyle="numKeyBaseStyle" />
<!-- Override defaultEnterKeyStyle in key_styles_enter.xml --> <!-- Override defaultEnterKeyStyle in key_styles_enter.xml -->
<key-style <key-style
latin:styleName="defaultEnterKeyStyle" latin:styleName="defaultEnterKeyStyle"
latin:code="!code/key_enter" latin:keyLabel="!icon/enter_key|!code/key_enter"
latin:keyIcon="!icon/enter_key"
latin:keyLabelFlags="preserveCase|autoXScale|followKeyLargeLabelRatio" latin:keyLabelFlags="preserveCase|autoXScale|followKeyLargeLabelRatio"
latin:keyActionFlags="noKeyPreview" latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" latin:backgroundType="functional"

View File

@ -22,9 +22,7 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Key <Key
latin:keyLabel="{" latin:keyLabel="{|!code/key_left_curly_bracket" />
latin:code="!code/key_left_curly_bracket" />
<Key <Key
latin:keyLabel="}" latin:keyLabel="}|!code/key_right_curly_bracket" />
latin:code="!code/key_right_curly_bracket" />
</merge> </merge>

View File

@ -25,28 +25,25 @@
<case <case
latin:languageCode="fa" latin:languageCode="fa"
> >
<!-- TODO: Introduce !code/key_{left,right}_angle_quotation. -->
<!-- U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK <!-- U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK --> U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -->
<Key <Key
latin:keyLabel="&#x00AB;" latin:keyLabel="&#x00AB;|&#x00BB;"
latin:code="0x00BB"
latin:backgroundType="functional" latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_less_than" /> latin:moreKeys="!text/more_keys_for_less_than" />
<Key <Key
latin:keyLabel="&#x00BB;" latin:keyLabel="&#x00BB;|&#x00AB;"
latin:code="0x00AB"
latin:backgroundType="functional" latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_greater_than" /> latin:moreKeys="!text/more_keys_for_greater_than" />
</case> </case>
<default> <default>
<Key <Key
latin:keyLabel="&lt;" latin:keyLabel="&lt;|!code/key_less_than"
latin:code="!code/key_less_than"
latin:backgroundType="functional" latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_less_than" /> latin:moreKeys="!text/more_keys_for_less_than" />
<Key <Key
latin:keyLabel="&gt;" latin:keyLabel="&gt;|!code/key_greater_than"
latin:code="!code/key_greater_than"
latin:backgroundType="functional" latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_greater_than" /> latin:moreKeys="!text/more_keys_for_greater_than" />
</default> </default>

View File

@ -22,11 +22,9 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Key <Key
latin:keyLabel="(" latin:keyLabel="(|!code/key_left_parenthesis"
latin:code="!code/key_left_parenthesis"
latin:moreKeys="!text/more_keys_for_left_parenthesis" /> latin:moreKeys="!text/more_keys_for_left_parenthesis" />
<Key <Key
latin:keyLabel=")" latin:keyLabel=")|!code/key_right_parenthesis"
latin:code="!code/key_right_parenthesis"
latin:moreKeys="!text/more_keys_for_right_parenthesis" /> latin:moreKeys="!text/more_keys_for_right_parenthesis" />
</merge> </merge>

View File

@ -22,9 +22,7 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Key <Key
latin:keyLabel="[" latin:keyLabel="[|!code/key_left_square_bracket" />
latin:code="!code/key_left_square_bracket" />
<Key <Key
latin:keyLabel="]" latin:keyLabel="]|!code/key_right_square_bracket" />
latin:code="!code/key_right_square_bracket" />
</merge> </merge>

View File

@ -29,7 +29,6 @@
U+094D: "्" DEVANAGARI SIGN VIRAMA --> U+094D: "्" DEVANAGARI SIGN VIRAMA -->
<key-style <key-style
latin:styleName="baseKeyDevanagariSignVirama" latin:styleName="baseKeyDevanagariSignVirama"
latin:keyLabel="&#x25CC;&#x094D;" latin:keyLabel="&#x25CC;&#x094D;|&#x094D;"
latin:code="0x094D"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -29,7 +29,6 @@
U+0903: "" DEVANAGARI SIGN VISARGA --> U+0903: "" DEVANAGARI SIGN VISARGA -->
<key-style <key-style
latin:styleName="baseKeyDevanagariSignVisarga" latin:styleName="baseKeyDevanagariSignVisarga"
latin:keyLabel="&#x25CC;&#x0903;" latin:keyLabel="&#x25CC;&#x0903;|&#x0903;"
latin:code="0x0903"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -46,7 +46,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignAa" latin:styleName="baseKeyDevanagariVowelSignAa"
latin:parentStyle="moreKeysDevanagariVowelSignAa" latin:parentStyle="moreKeysDevanagariVowelSignAa"
latin:keyLabel="&#x25CC;&#x093E;" latin:keyLabel="&#x25CC;&#x093E;|&#x093E;"
latin:code="0x093E"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -53,7 +53,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignAi" latin:styleName="baseKeyDevanagariVowelSignAi"
latin:parentStyle="moreKeysDevanagariVowelSignAi" latin:parentStyle="moreKeysDevanagariVowelSignAi"
latin:keyLabel="&#x25CC;&#x0948;" latin:keyLabel="&#x25CC;&#x0948;|&#x0948;"
latin:code="0x0948"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -44,7 +44,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignAu" latin:styleName="baseKeyDevanagariVowelSignAu"
latin:parentStyle="moreKeysDevanagariVowelSignAu" latin:parentStyle="moreKeysDevanagariVowelSignAu"
latin:keyLabel="&#x25CC;&#x094C;" latin:keyLabel="&#x25CC;&#x094C;|&#x094C;"
latin:code="0x094C"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -53,7 +53,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignE" latin:styleName="baseKeyDevanagariVowelSignE"
latin:parentStyle="moreKeysDevanagariVowelSignE" latin:parentStyle="moreKeysDevanagariVowelSignE"
latin:keyLabel="&#x25CC;&#x0947;" latin:keyLabel="&#x25CC;&#x0947;|&#x0947;"
latin:code="0x0947"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -45,7 +45,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignI" latin:styleName="baseKeyDevanagariVowelSignI"
latin:parentStyle="moreKeysDevanagariVowelSignI" latin:parentStyle="moreKeysDevanagariVowelSignI"
latin:keyLabel="&#x25CC;&#x093F;" latin:keyLabel="&#x25CC;&#x093F;|&#x093F;"
latin:code="0x093F"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -45,7 +45,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignIi" latin:styleName="baseKeyDevanagariVowelSignIi"
latin:parentStyle="moreKeysDevanagariVowelSignIi" latin:parentStyle="moreKeysDevanagariVowelSignIi"
latin:keyLabel="&#x25CC;&#x0940;" latin:keyLabel="&#x25CC;&#x0940;|&#x0940;"
latin:code="0x0940"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -47,7 +47,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignO" latin:styleName="baseKeyDevanagariVowelSignO"
latin:parentStyle="moreKeysDevanagariVowelSignO" latin:parentStyle="moreKeysDevanagariVowelSignO"
latin:keyLabel="&#x25CC;&#x094B;" latin:keyLabel="&#x25CC;&#x094B;|&#x094B;"
latin:code="0x094B"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -46,7 +46,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignU" latin:styleName="baseKeyDevanagariVowelSignU"
latin:parentStyle="moreKeysDevanagariVowelSignU" latin:parentStyle="moreKeysDevanagariVowelSignU"
latin:keyLabel="&#x25CC;&#x0941;" latin:keyLabel="&#x25CC;&#x0941;|&#x0941;"
latin:code="0x0941"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -46,7 +46,6 @@
<key-style <key-style
latin:styleName="baseKeyDevanagariVowelSignUu" latin:styleName="baseKeyDevanagariVowelSignUu"
latin:parentStyle="moreKeysDevanagariVowelSignUu" latin:parentStyle="moreKeysDevanagariVowelSignUu"
latin:keyLabel="&#x25CC;&#x0942;" latin:keyLabel="&#x25CC;&#x0942;|&#x0942;"
latin:code="0x0942"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge> </merge>

View File

@ -28,15 +28,14 @@
<case <case
latin:languageCode="fa" latin:languageCode="fa"
> >
<!-- TODO: Introduce !code/key_{left,right}_angle_quotation. -->
<!-- U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK <!-- U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK --> U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -->
<Key <Key
latin:keyLabel="&#x00AB;" latin:keyLabel="&#x00AB;|&#x00BB;"
latin:code="0x00BB"
latin:moreKeys="!text/more_keys_for_double_quote" /> latin:moreKeys="!text/more_keys_for_double_quote" />
<Key <Key
latin:keyLabel="&#x00BB;" latin:keyLabel="&#x00BB;|&#x00AB;"
latin:code="0x00AB"
latin:moreKeys="!text/more_keys_for_single_quote" /> latin:moreKeys="!text/more_keys_for_single_quote" />
</case> </case>
<default> <default>

View File

@ -48,8 +48,7 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E39;" latin:keyLabel="&#x20;&#x0E39;|&#x0E39;"
latin:code="0x0E39"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT --> <!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT -->
<Key <Key
@ -114,16 +113,14 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E38;" latin:keyLabel="&#x20;&#x0E38;|&#x0E38;"
latin:code="0x0E38"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0020: " " SPACE <!-- U+0020: " " SPACE
U+0E36: " ึ" THAI CHARACTER SARA UE --> U+0E36: " ึ" THAI CHARACTER SARA UE -->
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E36;" latin:keyLabel="&#x20;&#x0E36;|&#x0E36;"
latin:code="0x0E36"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0E04: "ค" THAI CHARACTER KHO KHWAI <!-- U+0E04: "ค" THAI CHARACTER KHO KHWAI
U+0E55: "๕" THAI DIGIT FIVE --> U+0E55: "๕" THAI DIGIT FIVE -->

View File

@ -48,16 +48,14 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E4D;" latin:keyLabel="&#x20;&#x0E4D;|&#x0E4D;"
latin:code="0x0E4D"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0020: " " SPACE <!-- U+0020: " " SPACE
U+0E4A: " ๊" THAI CHARACTER MAI TRI --> U+0E4A: " ๊" THAI CHARACTER MAI TRI -->
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E4A;" latin:keyLabel="&#x20;&#x0E4A;|&#x0E4A;"
latin:code="0x0E4A"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0E13: "ณ" THAI CHARACTER NO NEN --> <!-- U+0E13: "ณ" THAI CHARACTER NO NEN -->
<Key <Key
@ -108,16 +106,14 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E31;" latin:keyLabel="&#x20;&#x0E31;|&#x0E31;"
latin:code="0x0E31"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0020: " " SPACE <!-- U+0020: " " SPACE
U+0E35: " ี" HAI CHARACTER SARA II --> U+0E35: " ี" HAI CHARACTER SARA II -->
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E35;" latin:keyLabel="&#x20;&#x0E35;|&#x0E35;"
latin:code="0x0E35"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0E23: "ร" THAI CHARACTER RO RUA --> <!-- U+0E23: "ร" THAI CHARACTER RO RUA -->
<Key <Key

View File

@ -50,16 +50,14 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E47;" latin:keyLabel="&#x20;&#x0E47;|&#x0E47;"
latin:code="0x0E47"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0020: " " SPACE <!-- U+0020: " " SPACE
U+0E4B: " ๋" THAI CHARACTER MAI CHATTAWA --> U+0E4B: " ๋" THAI CHARACTER MAI CHATTAWA -->
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E4B;" latin:keyLabel="&#x20;&#x0E4B;|&#x0E4B;"
latin:code="0x0E4B"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0E29: "ษ" THAI CHARACTER SO RUSI --> <!-- U+0E29: "ษ" THAI CHARACTER SO RUSI -->
<Key <Key
@ -102,16 +100,14 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E49;" latin:keyLabel="&#x20;&#x0E49;|&#x0E49;"
latin:code="0x0E49"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0020: " " SPACE <!-- U+0020: " " SPACE
U+0E48: " ่" THAI CHARACTER MAI EK --> U+0E48: " ่" THAI CHARACTER MAI EK -->
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E48;" latin:keyLabel="&#x20;&#x0E48;|&#x0E48;"
latin:code="0x0E48"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0E32: "า" THAI CHARACTER SARA AA --> <!-- U+0E32: "า" THAI CHARACTER SARA AA -->
<Key <Key

View File

@ -42,16 +42,14 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E3A;" latin:keyLabel="&#x20;&#x0E3A;|&#x0E3A;"
latin:code="0x0E3A"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0020: " " SPACE <!-- U+0020: " " SPACE
U+0E4C: " ์" THAI CHARACTER THANTHAKHAT --> U+0E4C: " ์" THAI CHARACTER THANTHAKHAT -->
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E4C;" latin:keyLabel="&#x20;&#x0E4C;|&#x0E4C;"
latin:code="0x0E4C"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<Key <Key
latin:keyLabel="\?" /> latin:keyLabel="\?" />
@ -90,16 +88,14 @@
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E34;" latin:keyLabel="&#x20;&#x0E34;|&#x0E34;"
latin:code="0x0E34"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0020: " " SPACE <!-- U+0020: " " SPACE
U+0E37: " ื" THAI CHARACTER SARA UEE --> U+0E37: " ื" THAI CHARACTER SARA UEE -->
<!-- Note: The space character is needed as a preceding letter to draw some Thai <!-- Note: The space character is needed as a preceding letter to draw some Thai
composing characters correctly. --> composing characters correctly. -->
<Key <Key
latin:keyLabel="&#x20;&#x0E37;" latin:keyLabel="&#x20;&#x0E37;|&#x0E37;"
latin:code="0x0E37"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
<!-- U+0E17: "ท" THAI CHARACTER THO THAHAN --> <!-- U+0E17: "ท" THAI CHARACTER THO THAHAN -->
<Key <Key

View File

@ -113,10 +113,8 @@
<case <case
latin:mode="datetime" latin:mode="datetime"
> >
<!-- U+002F: "/" SOLIDUS -->
<Key <Key
latin:code="0x002F" latin:keyLabel="/ :|/"
latin:keyLabel="/ :"
latin:moreKeys="!noPanelAutoMoreKey!,:" latin:moreKeys="!noPanelAutoMoreKey!,:"
latin:keyStyle="numKeyStyle" /> latin:keyStyle="numKeyStyle" />
</case> </case>

View File

@ -68,8 +68,7 @@
<!-- U+0030: "0" DIGIT ZERO --> <!-- U+0030: "0" DIGIT ZERO -->
<Key <Key
latin:keyStyle="num0KeyStyle" latin:keyStyle="num0KeyStyle"
latin:code="0x0030" latin:keyLabel="0 +|0"
latin:keyLabel="0 +"
latin:moreKeys="!noPanelAutoMoreKey!,+" /> latin:moreKeys="!noPanelAutoMoreKey!,+" />
<Key <Key
latin:keyStyle="numSpaceKeyStyle" /> latin:keyStyle="numSpaceKeyStyle" />

View File

@ -316,20 +316,17 @@ public class Key implements Comparable<Key> {
mActionFlags = actionFlags; mActionFlags = actionFlags;
final String keySpec = style.getString(keyAttr, R.styleable.Keyboard_Key_keyLabel); final String keySpec = style.getString(keyAttr, R.styleable.Keyboard_Key_keyLabel);
if (TextUtils.isEmpty(keySpec)) {
throw new RuntimeException("Empty keySpec");
}
final int iconIdInAttr = KeySpecParser.getIconId(style.getString(keyAttr, mIconId = KeySpecParser.getIconId(keySpec);
R.styleable.Keyboard_Key_keyIcon));
mIconId = (iconIdInAttr != ICON_UNDEFINED) ? iconIdInAttr
: KeySpecParser.getIconId(keySpec);
final int disabledIconId = KeySpecParser.getIconId(style.getString(keyAttr, final int disabledIconId = KeySpecParser.getIconId(style.getString(keyAttr,
R.styleable.Keyboard_Key_keyIconDisabled)); R.styleable.Keyboard_Key_keyIconDisabled));
final int previewIconId = KeySpecParser.getIconId(style.getString(keyAttr, final int previewIconId = KeySpecParser.getIconId(style.getString(keyAttr,
R.styleable.Keyboard_Key_keyIconPreview)); R.styleable.Keyboard_Key_keyIconPreview));
final int codeInAttr = KeySpecParser.parseCode(style.getString(keyAttr, final int code = KeySpecParser.getCode(keySpec, params.mCodesSet);
R.styleable.Keyboard_Key_code), params.mCodesSet, CODE_UNSPECIFIED);
final int code = (codeInAttr != CODE_UNSPECIFIED) ? codeInAttr
: KeySpecParser.getCode(keySpec, params.mCodesSet);
if ((mLabelFlags & LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL) != 0) { if ((mLabelFlags & LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL) != 0) {
mLabel = params.mId.mCustomActionLabel; mLabel = params.mId.mCustomActionLabel;
} else if (code >= Character.MIN_SUPPLEMENTARY_CODE_POINT) { } else if (code >= Character.MIN_SUPPLEMENTARY_CODE_POINT) {
@ -376,10 +373,10 @@ public class Key implements Comparable<Key> {
} else { } else {
mCode = StringUtils.toUpperCaseOfCodeForLocale(code, needsToUpperCase, locale); mCode = StringUtils.toUpperCaseOfCodeForLocale(code, needsToUpperCase, locale);
} }
final int altCodeInAttr = KeySpecParser.parseCode(style.getString(keyAttr,
R.styleable.Keyboard_Key_altCode), params.mCodesSet, CODE_UNSPECIFIED);
final int altCode = StringUtils.toUpperCaseOfCodeForLocale( final int altCode = StringUtils.toUpperCaseOfCodeForLocale(
KeySpecParser.parseCode(style.getString(keyAttr, altCodeInAttr, needsToUpperCase, locale);
R.styleable.Keyboard_Key_altCode), params.mCodesSet, CODE_UNSPECIFIED),
needsToUpperCase, locale);
mOptionalAttributes = OptionalAttributes.newInstance(outputText, altCode, mOptionalAttributes = OptionalAttributes.newInstance(outputText, altCode,
disabledIconId, previewIconId, visualInsetsLeft, visualInsetsRight); disabledIconId, previewIconId, visualInsetsLeft, visualInsetsRight);
mKeyVisualAttributes = KeyVisualAttributes.newInstance(keyAttr); mKeyVisualAttributes = KeyVisualAttributes.newInstance(keyAttr);

View File

@ -135,14 +135,12 @@ public final class KeyStylesSet {
public void readKeyAttributes(final TypedArray keyAttr) { public void readKeyAttributes(final TypedArray keyAttr) {
// TODO: Currently not all Key attributes can be declared as style. // TODO: Currently not all Key attributes can be declared as style.
readString(keyAttr, R.styleable.Keyboard_Key_code);
readString(keyAttr, R.styleable.Keyboard_Key_altCode); readString(keyAttr, R.styleable.Keyboard_Key_altCode);
readString(keyAttr, R.styleable.Keyboard_Key_keyLabel); readString(keyAttr, R.styleable.Keyboard_Key_keyLabel);
readString(keyAttr, R.styleable.Keyboard_Key_keyHintLabel); readString(keyAttr, R.styleable.Keyboard_Key_keyHintLabel);
readStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys); readStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys);
readStringArray(keyAttr, R.styleable.Keyboard_Key_additionalMoreKeys); readStringArray(keyAttr, R.styleable.Keyboard_Key_additionalMoreKeys);
readFlags(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags); readFlags(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags);
readString(keyAttr, R.styleable.Keyboard_Key_keyIcon);
readString(keyAttr, R.styleable.Keyboard_Key_keyIconDisabled); readString(keyAttr, R.styleable.Keyboard_Key_keyIconDisabled);
readString(keyAttr, R.styleable.Keyboard_Key_keyIconPreview); readString(keyAttr, R.styleable.Keyboard_Key_keyIconPreview);
readInt(keyAttr, R.styleable.Keyboard_Key_maxMoreKeysColumn); readInt(keyAttr, R.styleable.Keyboard_Key_maxMoreKeysColumn);

View File

@ -196,8 +196,8 @@
<string name="shortcut_as_more_key">!icon/shortcut_key|!code/key_shortcut</string> <string name="shortcut_as_more_key">!icon/shortcut_key|!code/key_shortcut</string>
<string name="action_next_as_more_key">!hasLabels!,\@string/label_next_key|!code/key_action_next</string> <string name="action_next_as_more_key">!hasLabels!,\@string/label_next_key|!code/key_action_next</string>
<string name="action_previous_as_more_key">!hasLabels!,\@string/label_previous_key|!code/key_action_previous</string> <string name="action_previous_as_more_key">!hasLabels!,\@string/label_previous_key|!code/key_action_previous</string>
<!-- Label for "switch to more symbol" modifier key. Must be short to fit on key! --> <!-- Label for "switch to more symbol" modifier key ("= \ <"). Must be short to fit on key! -->
<string name="label_to_more_symbol_key">= \\ &lt;</string> <string name="label_to_more_symbol_key">= \\\\ &lt;</string>
<!-- Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! --> <!-- Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! -->
<string name="label_to_more_symbol_for_tablet_key">~ [ &lt;</string> <string name="label_to_more_symbol_for_tablet_key">~ [ &lt;</string>
<!-- Label for "Tab" key. Must be short to fit on key! --> <!-- Label for "Tab" key. Must be short to fit on key! -->