Remove BIDI mirroring hack from Key
This change also removes isRtlKeyboard attribute from <Keyboard/>
Bug: 5948247
Change-Id: I85998f17ae146a4c8cd0f419ab820b746cb8974f
diff --git a/java/res/xml/kbd_arabic.xml b/java/res/xml/kbd_arabic.xml
index d7f77cc..ce5f30b 100644
--- a/java/res/xml/kbd_arabic.xml
+++ b/java/res/xml/kbd_arabic.xml
@@ -20,7 +20,6 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:isRtlKeyboard="true"
>
<include
latin:keyboardLayout="@xml/rows_arabic" />
diff --git a/java/res/xml/kbd_hebrew.xml b/java/res/xml/kbd_hebrew.xml
index 3d574db..74836f3 100644
--- a/java/res/xml/kbd_hebrew.xml
+++ b/java/res/xml/kbd_hebrew.xml
@@ -20,7 +20,6 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:isRtlKeyboard="true"
>
<include
latin:keyboardLayout="@xml/rows_hebrew" />
diff --git a/java/res/xml/keys_curly_brackets.xml b/java/res/xml/keys_curly_brackets.xml
new file mode 100644
index 0000000..b43fbb1
--- /dev/null
+++ b/java/res/xml/keys_curly_brackets.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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"
+>
+ <Key
+ latin:keyLabel="{"
+ latin:keyOutputText="@string/output_text_for_left_curly_bracket" />
+ <Key
+ latin:keyLabel="}"
+ latin:keyOutputText="@string/output_text_for_right_curly_bracket" />
+</merge>
diff --git a/java/res/xml/keys_less_greater.xml b/java/res/xml/keys_less_greater.xml
new file mode 100644
index 0000000..8e90199
--- /dev/null
+++ b/java/res/xml/keys_less_greater.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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"
+>
+ <Key
+ latin:keyLabel="<"
+ latin:keyOutputText="@string/output_text_for_less_than"
+ latin:moreKeys="@string/more_keys_for_less_than" />
+ <Key
+ latin:keyLabel=">"
+ latin:keyOutputText="@string/output_text_for_greater_than"
+ latin:moreKeys="@string/more_keys_for_greater_than" />
+</merge>
diff --git a/java/res/xml/keys_parentheses.xml b/java/res/xml/keys_parentheses.xml
new file mode 100644
index 0000000..bacb26d
--- /dev/null
+++ b/java/res/xml/keys_parentheses.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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"
+>
+ <Key
+ latin:keyLabel="("
+ latin:keyOutputText="@string/output_text_for_left_parenthesis"
+ latin:moreKeys="@string/more_keys_for_left_parenthesis" />
+ <Key
+ latin:keyLabel=")"
+ latin:keyOutputText="@string/output_text_for_right_parenthesis"
+ latin:moreKeys="@string/more_keys_for_right_parenthesis" />
+</merge>
diff --git a/java/res/xml/keys_square_brackets.xml b/java/res/xml/keys_square_brackets.xml
new file mode 100644
index 0000000..3525f4d
--- /dev/null
+++ b/java/res/xml/keys_square_brackets.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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"
+>
+ <Key
+ latin:keyLabel="["
+ latin:keyOutputText="@string/output_text_for_left_square_bracket" />
+ <Key
+ latin:keyLabel="]"
+ latin:keyOutputText="@string/output_text_for_right_square_bracket" />
+</merge>
diff --git a/java/res/xml/rows_azerty.xml b/java/res/xml/rows_azerty.xml
index 142ebc0..533c683 100644
--- a/java/res/xml/rows_azerty.xml
+++ b/java/res/xml/rows_azerty.xml
@@ -130,9 +130,13 @@
<Key
latin:keyLabel="n"
latin:moreKeys="@string/more_keys_for_n" />
+ <!-- TODO: Introduce a flag, such as strinctMoreKeysOrder, to control moreKeys display
+ order more precisely. -->
+ <!-- This key is close enough to right edge, so that the 4-more keys will be displayed in
+ order of "4,3,1,2". See @string/more_keys_for_single_quote -->
<Key
latin:keyLabel="\'"
- latin:moreKeys="‘,’,‚,‛" />
+ latin:moreKeys="\u2018,\u2019,\u201b,\u201a" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight"
diff --git a/java/res/xml/rows_symbols.xml b/java/res/xml/rows_symbols.xml
index d0d0edb..81a9a46 100644
--- a/java/res/xml/rows_symbols.xml
+++ b/java/res/xml/rows_symbols.xml
@@ -93,13 +93,8 @@
<Key
latin:keyLabel="+"
latin:moreKeys="@string/more_keys_for_plus" />
- <Key
- latin:keyLabel="("
- latin:moreKeys="@string/more_keys_for_left_parenthesis" />
- <Key
- latin:keyLabel=")"
- latin:moreKeys="@string/more_keys_for_right_parenthesis"
- latin:keyWidth="fillRight" />
+ <include
+ latin:keyboardLayout="@xml/keys_parentheses" />
</Row>
<Row
latin:keyWidth="10%p"
@@ -111,15 +106,13 @@
<Key
latin:keyLabel="!"
latin:moreKeys="¡" />
- <!-- Note: Neither DroidSans nor Roboto have a glyph for ‟ Double high-reversed-9 quotation mark U+201F. -->
- <!-- latin:moreKeys="“,”,„,‟,«,»" -->
<Key
latin:keyLabel="""
- latin:moreKeys="“,”,«,»"
- latin:maxMoreKeysColumn="6" />
+ latin:moreKeys="@string/more_keys_for_double_quote"
+ latin:maxMoreKeysColumn="4" />
<Key
latin:keyLabel="\'"
- latin:moreKeys="‘,’,‚,‛" />
+ latin:moreKeys="@string/more_keys_for_single_quote" />
<Key
latin:keyLabel=":" />
<Key
diff --git a/java/res/xml/rows_symbols_shift.xml b/java/res/xml/rows_symbols_shift.xml
index 6d1838c..828bd06 100644
--- a/java/res/xml/rows_symbols_shift.xml
+++ b/java/res/xml/rows_symbols_shift.xml
@@ -46,11 +46,8 @@
latin:keyLabel="÷" />
<Key
latin:keyLabel="×" />
- <Key
- latin:keyLabel="{" />
- <Key
- latin:keyLabel="}"
- latin:keyWidth="fillRight" />
+ <include
+ latin:keyboardLayout="@xml/keys_curly_brackets" />
</Row>
<Row
latin:keyWidth="10%p"
@@ -74,11 +71,8 @@
<Key
latin:keyLabel="="
latin:moreKeys="≠,≈,∞" />
- <Key
- latin:keyLabel="[" />
- <Key
- latin:keyLabel="]"
- latin:keyWidth="fillRight" />
+ <include
+ latin:keyboardLayout="@xml/keys_square_brackets" />
</Row>
<Row
latin:keyWidth="10%p"
@@ -98,12 +92,8 @@
latin:moreKeys="§" />
<Key
latin:keyLabel="\\" />
- <Key
- latin:keyLabel="<"
- latin:moreKeys="≤,«,‹" />
- <Key
- latin:keyLabel=">"
- latin:moreKeys="≥,»,›" />
+ <include
+ latin:keyboardLayout="@xml/keys_less_greater" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight"