Add Turkish keyboard layout

Closes #242 on GitHub

Signed-off-by: Aleksandras Kostarevas <aleks076@protonmail.com>
This commit is contained in:
Emre Eren 2024-07-21 19:52:43 +03:00 committed by Aleksandras Kostarevas
parent 0eb8d28c1b
commit 270ff11fea
10 changed files with 271 additions and 2 deletions

View File

@ -123,5 +123,7 @@
<item>nordic</item>
<item>tr:AsciiCapable,SupportTouchPositionCorrection,EmojiCapable</item>
<item>qwerty</item>
<item>tr:AsciiCapable,SupportTouchPositionCorrection,EmojiCapable</item>
<item>turkish</item>
</string-array>
</resources>

View File

@ -614,5 +614,6 @@ Tip: You can download and remove dictionaries by going to &lt;b>Languages&#160;&
<string name="layout_thai">Thai</string>
<string name="layout_uzbek">Uzbek</string>
<string name="layout_kurdish">Kurdish</string>
<string name="layout_turkish">Turkish</string>
<string name="layout_default">Default</string>
</resources>

View File

@ -0,0 +1,24 @@
<?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.
*/
-->
<Keyboard xmlns:latin="http://schemas.android.com/apk/res-auto">
<include latin:keyboardLayout="@xml/rows_turkish" />
</Keyboard>

View File

@ -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-auto">
<Element
latin:elementName="alphabet"
latin:elementKeyboard="@xml/kdb_turkish"
latin:enableProximityCharsCorrection="true" />
<Element
latin:elementName="symbols"
latin:elementKeyboard="@xml/kbd_symbols" />
<Element
latin:elementName="symbolsShifted"
latin:elementKeyboard="@xml/kbd_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>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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-auto"
>
<Key
latin:keySpec="!text/keyspec_q"
latin:moreKeys="!text/morekeys_q,!text/qwertysyms_q,!text/number_1,!text/actions_q" />
<Key
latin:keySpec="!text/keyspec_w"
latin:moreKeys="!text/morekeys_w,!text/qwertysyms_w,!text/number_2,!text/actions_w" />
<Key
latin:keySpec="e"
latin:moreKeys="!text/morekeys_e,!text/morekeys_misc_e,!text/qwertysyms_e,!text/number_3,!text/actions_e" />
<Key
latin:keySpec="r"
latin:moreKeys="!text/morekeys_r,!text/qwertysyms_r,!text/number_4,!text/actions_r" />
<Key
latin:keySpec="t"
latin:moreKeys="!text/morekeys_t,!text/qwertysyms_t,!text/number_5,!text/actions_t" />
<Key
latin:keySpec="!text/keyspec_y"
latin:moreKeys="!text/morekeys_y,!text/qwertysyms_y,!text/number_6,!text/actions_y" />
<Key
latin:keySpec="u"
latin:moreKeys="!text/morekeys_u,!text/morekeys_misc_u,!text/qwertysyms_u,!text/number_7,!text/actions_u" />
<!-- U+0131: "ı" LATIN SMALL LETTER DOTLESS I -->
<Key
latin:keySpec="&#x0131;"
latin:moreKeys="!text/morekeys_i,!text/morekeys_misc_i,!text/qwertysyms_i,!text/number_8,!text/actions_i" />
<Key
latin:keySpec="o"
latin:moreKeys="!text/morekeys_o,!text/morekeys_misc_o,!text/qwertysyms_o,!text/number_9,!text/actions_o" />
<Key
latin:keySpec="p"
latin:moreKeys="!text/morekeys_p,!text/qwertysyms_p,!text/number_0,!text/actions_p" />
<!-- U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE
U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA -->
<Key
latin:keySpec="&#x011F;"
latin:keyHintLabel="&#x0123;"
latin:additionalMoreKeys="!text/morekeys_g" />
<!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE-->
<Key
latin:keySpec="&#x00FC;"
latin:keyHintLabel="&#x00FA;"
latin:moreKeys="!text/morekeys_u" />
</merge>

View File

@ -0,0 +1,36 @@
<?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-auto">
<include
latin:keyboardLayout="@xml/rowkeys_qwerty2" />
<!-- U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE-->
<Key
latin:keySpec="&#x015F;"
latin:keyHintLabel="&#x015B;"
latin:moreKeys="!text/morekeys_s" />
<!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE -->
<Key
latin:keySpec="i"
latin:keyHintLabel="&#x00ED;"
latin:additionalMoreKeys="!text/morekeys_i" />
</merge>

View File

@ -0,0 +1,37 @@
<?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-auto">
<include
latin:keyboardLayout="@xml/rowkeys_qwerty3" />
<!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE -->
<Key
latin:keySpec="&#x00F6;"
latin:keyHintLabel="&#x00F3;"
latin:moreKeys="!text/morekeys_o" />
<!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE -->
<Key
latin:keySpec="&#x00E7;"
latin:keyHintLabel="&#x0107;"
latin:additionalMoreKeys="!text/morekeys_c" />
</merge>

View File

@ -0,0 +1,56 @@
<?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-auto"
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
<include latin:keyboardLayout="@xml/row_number_switch" />
<Row
latin:keyWidth="8.333%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_turkish1" />
</Row>
<Row
latin:keyWidth="8.333%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_turkish2"
latin:keyXPos="4.167%p" />
</Row>
<Row
latin:keyWidth="8.333%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.5%p"
latin:visualInsetsRight="1%p" />
<include
latin:keyboardLayout="@xml/rowkeys_turkish3" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p" />
</Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>

View File

@ -109,7 +109,7 @@ val LocaleLayoutMap = mapOf(
"te_IN" to listOf("telugu"),
"th" to listOf("thai"),
"tl" to makeQwertyWithPrimary("spanish"),
"tr" to QwertyVariants,
"tr" to makeQwertyWithPrimary("turkish"),
"uk" to listOf("east_slavic", "east_slavic_phonetic"),
"uz_UZ" to listOf("uzbek"),
"vi" to QwertyVariants,

View File

@ -19,7 +19,8 @@ data class ContributorInfo(
private fun contributor(name: String, vararg features: String) = ContributorInfo(name, features.toList())
val contributors = listOf<ContributorInfo>(
contributor("Ravyar Tahir (@ravarage)", "Central Kurdish keyboard layout")
contributor("Ravyar Tahir (@ravarage)", "Central Kurdish keyboard layout"),
contributor("Emre Eren (@remreren)", "Turkish keyboard layout"),
)
@Preview(showBackground = true)