aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-04-23 11:44:49 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-04-23 15:19:37 +0900
commitb560a6cfee3c6e09fdf9d1a33bfa74022e6f5654 (patch)
tree5305c1618ea520ccf5241c9e20abedfc94f40162
parente060d1a540f9a1f4ba2b2a63b5ae77b893003b45 (diff)
downloadlatinime-b560a6cfee3c6e09fdf9d1a33bfa74022e6f5654.tar.gz
latinime-b560a6cfee3c6e09fdf9d1a33bfa74022e6f5654.tar.xz
latinime-b560a6cfee3c6e09fdf9d1a33bfa74022e6f5654.zip
Support Colemak layout
Bug: 4460018 Change-Id: I60c3dfaf205c95b92a54022f0256c33f644c8b10
-rw-r--r--java/res/values/donottranslate.xml3
-rw-r--r--java/res/xml-sw600dp/key_colemak_semicolon.xml29
-rw-r--r--java/res/xml-sw600dp/rows_colemak.xml65
-rw-r--r--java/res/xml-sw768dp/rows_colemak.xml71
-rw-r--r--java/res/xml/kbd_colemak.xml26
-rw-r--r--java/res/xml/key_colemak_semicolon.xml41
-rw-r--r--java/res/xml/keyboard_layout_set_colemak.xml42
-rw-r--r--java/res/xml/rowkeys_colemak1.xml66
-rw-r--r--java/res/xml/rowkeys_colemak2.xml54
-rw-r--r--java/res/xml/rowkeys_colemak3.xml42
-rw-r--r--java/res/xml/rows_colemak.xml56
11 files changed, 495 insertions, 0 deletions
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 99b80d0b6..37f073675 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -153,6 +153,7 @@
<item>qwertz</item>
<item>azerty</item>
<item>dvorak</item>
+ <item>colemak</item>
</string-array>
<!-- Predefined keyboard layout display names -->
<string-array name="predefined_layout_display_names">
@@ -160,6 +161,7 @@
<item>QWERTZ</item>
<item>AZERTY</item>
<item>Dvorak</item>
+ <item>Colemak</item>
</string-array>
<!-- Description for generic subtype that has predefined layout.
The string resource name must be "subtype_generic_<layout name>". -->
@@ -167,6 +169,7 @@
<string name="subtype_generic_qwertz">%s (QWERTZ)</string>
<string name="subtype_generic_azerty">%s (AZERTY)</string>
<string name="subtype_generic_dvorak">%s (Dvorak)</string>
+ <string name="subtype_generic_colemak">%s (Colemak)</string>
<!-- dictionary pack package name /settings activity (for shared prefs and settings) -->
<string name="dictionary_pack_package_name">com.google.android.inputmethod.latin.dictionarypack</string>
diff --git a/java/res/xml-sw600dp/key_colemak_semicolon.xml b/java/res/xml-sw600dp/key_colemak_semicolon.xml
new file mode 100644
index 000000000..a5a6e9526
--- /dev/null
+++ b/java/res/xml-sw600dp/key_colemak_semicolon.xml
@@ -0,0 +1,29 @@
+<?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:keyHintLabel=";"
+ latin:moreKeys=";"
+ latin:keyStyle="hasShiftedLetterHintStyle" />
+</merge>
diff --git a/java/res/xml-sw600dp/rows_colemak.xml b/java/res/xml-sw600dp/rows_colemak.xml
new file mode 100644
index 000000000..6c88e6517
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_colemak.xml
@@ -0,0 +1,65 @@
+<?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"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="8.5%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
+ <include
+ latin:keyboardLayout="@xml/key_colemak_semicolon" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.5%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak2"
+ latin:keyXPos="4.5%p" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.5%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.0%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <include
+ latin:keyboardLayout="@xml/key_smiley"
+ latin:keyXPos="-8.5%p"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml-sw768dp/rows_colemak.xml b/java/res/xml-sw768dp/rows_colemak.xml
new file mode 100644
index 000000000..e00448032
--- /dev/null
+++ b/java/res/xml-sw768dp/rows_colemak.xml
@@ -0,0 +1,71 @@
+<?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"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="8.282%p"
+ >
+ <Key
+ latin:keyStyle="tabKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="7.969%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
+ <include
+ latin:keyboardLayout="@xml/key_colemak_semicolon" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.125%p"
+ >
+ <Key
+ latin:keyStyle="toSymbolKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="10.167%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak2" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.047%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="13.829%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/kbd_colemak.xml b/java/res/xml/kbd_colemak.xml
new file mode 100644
index 000000000..ee1d5e86e
--- /dev/null
+++ b/java/res/xml/kbd_colemak.xml
@@ -0,0 +1,26 @@
+<?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.
+*/
+-->
+
+<Keyboard
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/rows_colemak" />
+</Keyboard>
diff --git a/java/res/xml/key_colemak_semicolon.xml b/java/res/xml/key_colemak_semicolon.xml
new file mode 100644
index 000000000..307b4ebca
--- /dev/null
+++ b/java/res/xml/key_colemak_semicolon.xml
@@ -0,0 +1,41 @@
+<?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"
+>
+ <switch>
+ <case
+ latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+ >
+ <Key
+ latin:keyLabel=";"
+ latin:keyHintLabel="0"
+ latin:additionalMoreKeys="0" />
+ </case>
+ <default>
+ <Key
+ latin:keyLabel=":"
+ latin:keyHintLabel="0"
+ latin:additionalMoreKeys="0"
+ latin:moreKeys=";" />
+ </default>
+ </switch>
+</merge>
diff --git a/java/res/xml/keyboard_layout_set_colemak.xml b/java/res/xml/keyboard_layout_set_colemak.xml
new file mode 100644
index 000000000..c18f13225
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_colemak.xml
@@ -0,0 +1,42 @@
+<?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.
+*/
+-->
+
+<KeyboardLayoutSet
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+ <Element
+ latin:elementName="alphabet"
+ latin:elementKeyboard="@xml/kbd_colemak"
+ latin:enableProximityCharsCorrection="true" />
+ <Element
+ latin:elementName="symbols"
+ latin:elementKeyboard="@xml/kbd_10_10_7_symbols" />
+ <Element
+ latin:elementName="symbolsShifted"
+ latin:elementKeyboard="@xml/kbd_10_10_7_symbols_shift" />
+ <Element
+ latin:elementName="phone"
+ latin:elementKeyboard="@xml/kbd_phone" />
+ <Element
+ latin:elementName="phoneSymbols"
+ latin:elementKeyboard="@xml/kbd_phone_symbols" />
+ <Element
+ latin:elementName="number"
+ latin:elementKeyboard="@xml/kbd_number" />
+</KeyboardLayoutSet>
diff --git a/java/res/xml/rowkeys_colemak1.xml b/java/res/xml/rowkeys_colemak1.xml
new file mode 100644
index 000000000..f1c30756b
--- /dev/null
+++ b/java/res/xml/rowkeys_colemak1.xml
@@ -0,0 +1,66 @@
+<?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="q"
+ latin:keyHintLabel="1"
+ latin:additionalMoreKeys="1" />
+ <Key
+ latin:keyLabel="w"
+ latin:keyHintLabel="2"
+ latin:additionalMoreKeys="2"
+ latin:moreKeys="!text/more_keys_for_w" />
+ <Key
+ latin:keyLabel="f"
+ latin:keyHintLabel="3"
+ latin:additionalMoreKeys="3" />
+ <Key
+ latin:keyLabel="p"
+ latin:keyHintLabel="4"
+ latin:additionalMoreKeys="4" />
+ <Key
+ latin:keyLabel="g"
+ latin:keyHintLabel="5"
+ latin:additionalMoreKeys="5"
+ latin:moreKeys="!text/more_keys_for_g" />
+ <Key
+ latin:keyLabel="j"
+ latin:keyHintLabel="6"
+ latin:additionalMoreKeys="6"
+ latin:moreKeys="!text/more_keys_for_j" />
+ <Key
+ latin:keyLabel="l"
+ latin:keyHintLabel="7"
+ latin:additionalMoreKeys="7"
+ latin:moreKeys="!text/more_keys_for_l" />
+ <Key
+ latin:keyLabel="u"
+ latin:keyHintLabel="8"
+ latin:additionalMoreKeys="8"
+ latin:moreKeys="!text/more_keys_for_u" />
+ <Key
+ latin:keyLabel="y"
+ latin:keyHintLabel="9"
+ latin:additionalMoreKeys="9"
+ latin:moreKeys="!text/more_keys_for_y" />
+</merge>
diff --git a/java/res/xml/rowkeys_colemak2.xml b/java/res/xml/rowkeys_colemak2.xml
new file mode 100644
index 000000000..f73d7e95f
--- /dev/null
+++ b/java/res/xml/rowkeys_colemak2.xml
@@ -0,0 +1,54 @@
+<?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="a"
+ latin:moreKeys="!text/more_keys_for_a" />
+ <Key
+ latin:keyLabel="r"
+ latin:moreKeys="!text/more_keys_for_r" />
+ <Key
+ latin:keyLabel="s"
+ latin:moreKeys="!text/more_keys_for_s" />
+ <Key
+ latin:keyLabel="t"
+ latin:moreKeys="!text/more_keys_for_t" />
+ <Key
+ latin:keyLabel="d"
+ latin:moreKeys="!text/more_keys_for_d" />
+ <Key
+ latin:keyLabel="h"
+ latin:moreKeys="!text/more_keys_for_h" />
+ <Key
+ latin:keyLabel="n"
+ latin:moreKeys="!text/more_keys_for_n" />
+ <Key
+ latin:keyLabel="e"
+ latin:moreKeys="!text/more_keys_for_e" />
+ <Key
+ latin:keyLabel="i"
+ latin:moreKeys="!text/more_keys_for_i" />
+ <Key
+ latin:keyLabel="o"
+ latin:moreKeys="!text/more_keys_for_o" />
+</merge>
diff --git a/java/res/xml/rowkeys_colemak3.xml b/java/res/xml/rowkeys_colemak3.xml
new file mode 100644
index 000000000..f0f915142
--- /dev/null
+++ b/java/res/xml/rowkeys_colemak3.xml
@@ -0,0 +1,42 @@
+<?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="z"
+ latin:moreKeys="!text/more_keys_for_z" />
+ <Key
+ latin:keyLabel="x" />
+ <Key
+ latin:keyLabel="c"
+ latin:moreKeys="!text/more_keys_for_c" />
+ <Key
+ latin:keyLabel="v"
+ latin:moreKeys="!text/more_keys_for_v" />
+ <Key
+ latin:keyLabel="b" />
+ <Key
+ latin:keyLabel="k"
+ latin:moreKeys="!text/more_keys_for_k" />
+ <Key
+ latin:keyLabel="m" />
+</merge>
diff --git a/java/res/xml/rows_colemak.xml b/java/res/xml/rows_colemak.xml
new file mode 100644
index 000000000..a1599650d
--- /dev/null
+++ b/java/res/xml/rows_colemak.xml
@@ -0,0 +1,56 @@
+<?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"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak1" />
+ <include
+ latin:keyboardLayout="@xml/key_colemak_semicolon" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak2" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="15%p"
+ latin:visualInsetsRight="1%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_colemak3" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight"
+ latin:visualInsetsLeft="1%p" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>