Skip to content

Commit d565b60

Browse files
vobademimikeNG
authored andcommitted
Add Turkish specific layout set
The current layout has the following missing keys: Row 1 key 8: replace "i" with U+0131: "ı" LATIN SMALL LETTER DOTLESS I Row 1 key 11: U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE Row 1 key 12: U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS Row 2 key 10: U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA Row 2 key 11: "i" Row 3 key 8: U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS Row 3 key 9: U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA Reference: https://commons.wikimedia.org/wiki/File:KB_Turkey_Q2.svg Note: LatinIMETests for Turkish layout alongside other QWERTY layouts will fail due to LineageOS team kept additionalmorekeys such as asterisk, hashtag, ampersand etc. but pulled tests from official upstream which dropped additionalmorekeys from all Latin keyboard layouts (except numerals at the top row). Change-Id: I49afc42a177dae5a743f36ea744b3189a238c544 Signed-off-by: Berkay Yıldırım <[email protected]>
1 parent 001e9c6 commit d565b60

File tree

16 files changed

+683
-72
lines changed

16 files changed

+683
-72
lines changed

java/res/values/donottranslate.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,5 @@
126126
<item>south_slavic</item>
127127
<item>sv:AsciiCapable,SupportTouchPositionCorrection,EmojiCapable</item>
128128
<item>nordic</item>
129-
<item>tr:AsciiCapable,SupportTouchPositionCorrection,EmojiCapable</item>
130-
<item>qwerty</item>
131129
</string-array>
132130
</resources>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
**
5+
** Copyright 2025, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
21+
<merge
22+
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
23+
>
24+
<include
25+
latin:keyboardLayout="@xml/key_styles_common" />
26+
<include latin:keyboardLayout="@xml/row_number_keys" />
27+
<Row
28+
latin:keyWidth="7.5%p"
29+
>
30+
<include
31+
latin:keyboardLayout="@xml/rowkeys_turkish1" />
32+
<Key
33+
latin:keyStyle="deleteKeyStyle"
34+
latin:keyWidth="fillRight" />
35+
</Row>
36+
<Row
37+
latin:keyWidth="7.5%p"
38+
>
39+
<include
40+
latin:keyboardLayout="@xml/rowkeys_turkish2"
41+
latin:keyXPos="3.75%p" />
42+
<Key
43+
latin:keyStyle="enterKeyStyle"
44+
latin:keyWidth="fillRight" />
45+
</Row>
46+
<Row
47+
latin:keyWidth="7.5%p"
48+
>
49+
<Key
50+
latin:keyStyle="shiftKeyStyle"
51+
latin:keyWidth="7.5%p" />
52+
<include
53+
latin:keyboardLayout="@xml/rowkeys_turkish3" />
54+
<include
55+
latin:keyboardLayout="@xml/keys_exclamation_question" />
56+
<Key
57+
latin:keyStyle="shiftKeyStyle"
58+
latin:keyWidth="fillRight" />
59+
</Row>
60+
<include
61+
latin:keyboardLayout="@xml/row_qwerty4" />
62+
</merge>

java/res/xml/kbd_turkish.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
**
5+
** Copyright 2025, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
21+
<Keyboard
22+
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
23+
>
24+
<include
25+
latin:keyboardLayout="@xml/rows_turkish" />
26+
</Keyboard>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
**
5+
** Copyright 2025, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
21+
<KeyboardLayoutSet
22+
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
23+
<Element
24+
latin:elementName="alphabet"
25+
latin:elementKeyboard="@xml/kbd_turkish"
26+
latin:enableProximityCharsCorrection="true"
27+
latin:allowRedundantMoreKeys="false" />
28+
<Element
29+
latin:elementName="symbols"
30+
latin:elementKeyboard="@xml/kbd_symbols" />
31+
<Element
32+
latin:elementName="symbolsShifted"
33+
latin:elementKeyboard="@xml/kbd_symbols_shift" />
34+
<Element
35+
latin:elementName="phone"
36+
latin:elementKeyboard="@xml/kbd_phone" />
37+
<Element
38+
latin:elementName="phoneSymbols"
39+
latin:elementKeyboard="@xml/kbd_phone_symbols" />
40+
<Element
41+
latin:elementName="number"
42+
latin:elementKeyboard="@xml/kbd_number" />
43+
</KeyboardLayoutSet>

java/res/xml/method.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
te_IN: Telugu (India)/telugu
102102
th: Thai/thai
103103
tl: Tagalog/spanish
104-
tr: Turkish/qwerty
104+
tr: Turkish/turkish
105105
uk: Ukrainian/east_slavic
106106
uz_UZ: Uzbek (Uzbekistan)/uzbek # This is a preliminary keyboard layout.
107107
vi: Vietnamese/qwerty
@@ -784,7 +784,7 @@
784784
android:subtypeId="0x4a3179de"
785785
android:imeSubtypeLocale="tr"
786786
android:imeSubtypeMode="keyboard"
787-
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
787+
android:imeSubtypeExtraValue="KeyboardLayoutSet=turkish,AsciiCapable,EmojiCapable"
788788
android:isAsciiCapable="true"
789789
/>
790790
<subtype android:icon="@drawable/ic_ime_switcher_dark"

java/res/xml/rowkeys_turkish1.xml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
**
5+
** Copyright 2025, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
21+
<merge
22+
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
23+
>
24+
<!-- q,w,e,r,t -->
25+
<include
26+
latin:keyboardLayout="@xml/rowkeys_qwerty1_left5" />
27+
<Key
28+
latin:keySpec="!text/keyspec_y"
29+
latin:keyHintLabel="6"
30+
latin:additionalMoreKeys="6"
31+
latin:moreKeys="!text/morekeys_y" />
32+
<Key
33+
latin:keySpec="u"
34+
latin:keyHintLabel="7"
35+
latin:additionalMoreKeys="7"
36+
latin:moreKeys="!text/morekeys_u" />
37+
<Key
38+
latin:keySpec="!text/keyspec_turkish_row1_8"
39+
latin:keyHintLabel="8"
40+
latin:additionalMoreKeys="8" />
41+
<Key
42+
latin:keySpec="o"
43+
latin:keyHintLabel="9"
44+
latin:additionalMoreKeys="9"
45+
latin:moreKeys="!text/morekeys_o" />
46+
<Key
47+
latin:keySpec="p"
48+
latin:keyHintLabel="0"
49+
latin:additionalMoreKeys="0" />
50+
<Key
51+
latin:keySpec="!text/keyspec_turkish_row1_11" />
52+
<Key
53+
latin:keySpec="!text/keyspec_turkish_row1_12" />
54+
</merge>

java/res/xml/rowkeys_turkish2.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
**
5+
** Copyright 2025, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
21+
<merge
22+
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
23+
>
24+
<include
25+
latin:keyboardLayout="@xml/rowkeys_qwerty2" />
26+
<Key
27+
latin:keySpec="!text/keyspec_turkish_row2_10" />
28+
<Key
29+
latin:keySpec="i"
30+
latin:moreKeys="!text/morekeys_i" />
31+
</merge>

java/res/xml/rowkeys_turkish3.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
**
5+
** Copyright 2025, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
21+
<merge
22+
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
23+
>
24+
<include
25+
latin:keyboardLayout="@xml/rowkeys_qwerty3" />
26+
<Key
27+
latin:keySpec="!text/keyspec_turkish_row3_8" />
28+
<Key
29+
latin:keySpec="!text/keyspec_turkish_row3_9" />
30+
</merge>

java/res/xml/rows_turkish.xml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
**
5+
** Copyright 2025, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
21+
<merge
22+
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
23+
>
24+
<include
25+
latin:keyboardLayout="@xml/key_styles_common" />
26+
<include latin:keyboardLayout="@xml/row_number_keys" />
27+
<Row
28+
latin:keyWidth="8.333%p"
29+
>
30+
<include
31+
latin:keyboardLayout="@xml/rowkeys_turkish1" />
32+
</Row>
33+
<Row
34+
latin:keyWidth="8.711%p"
35+
>
36+
<include
37+
latin:keyboardLayout="@xml/rowkeys_turkish2"
38+
latin:keyXPos="2.089%p" />
39+
</Row>
40+
<Row
41+
latin:keyWidth="8.711%p"
42+
>
43+
<Key
44+
latin:keyStyle="shiftKeyStyle"
45+
latin:keyWidth="10.8%p" />
46+
<include
47+
latin:keyboardLayout="@xml/rowkeys_turkish3" />
48+
<Key
49+
latin:keyStyle="deleteKeyStyle"
50+
latin:keyWidth="fillRight" />
51+
</Row>
52+
<include
53+
latin:keyboardLayout="@xml/row_qwerty4" />
54+
</merge>

0 commit comments

Comments
 (0)