Compare commits

..

47 Commits

Author SHA1 Message Date
Jules Aguillon
73737e5148 Release 1.22.1 2023-04-10 13:18:24 +02:00
Jules Aguillon
fc901bae9b Launcher activity: Fix crash on API < 28 2023-04-10 13:15:59 +02:00
doak
d4be979696 Do not lock modifiers if sliding a key
This unconditionally removes all pointers (touches) pressing modifiers
which are not already locked, avoiding that the (currently) latched
modifier will be locked aventually.

This can be verfified while sliding the space bar to move the cursor
left or right.

Closes #319.
2023-04-10 13:14:50 +02:00
Jules Aguillon
1aaf427883 Release 1.22.0 2023-04-02 17:27:44 +02:00
Jules Aguillon
a662934afc Bump targetSdkVersion to 33
No change needed.
2023-04-02 17:16:56 +02:00
Jules Aguillon
351355b3a7 Launcher activity: Input box
For trying the keyboard without having to mess with an other app.
2023-04-02 13:29:53 +02:00
Jules Aguillon
3caca59ff4 Refactor: Remove unecessary method KeyboardData.load_pin_entry 2023-03-28 11:55:24 +02:00
Jules Aguillon
35b4e442ab Add a launchable explanatory activity
This activity points to the system settings page for enabling input
methods. This is purely a shortcut but is expected by many users.

It could be made more useful in the future or hidden whenever the
keyboard is enabled.
2023-03-28 11:22:17 +02:00
Jules Aguillon
c4de1ec267 sync_translations.py: Output sub-elements 2023-03-28 11:11:41 +02:00
Chasm Solacer
59b0b60f3f Updated pl (Polish) translation (#316) 2023-03-24 01:26:14 +01:00
Jules Aguillon
2f938dc6f4 Correct pointer direction
The previous algorithm did not cut the circle into 16 equal parts.
The division by 2pi yielded numbers smaller than 16, which no longer
made sense after the cast to int.
2023-03-13 03:06:43 +01:00
Mostafa Ayesh
ce51df6f5a Add Arabic layout (#314)
* add arabic keyboard
* use unicode values for special characters
* add alternate layout
* use arabic numbers
2023-03-11 16:54:20 +01:00
Luke Videckis
6aaa497393 New Hindi layout (#313)
* New Hindi layout
* Update default layout for Marathi, Nepali
* Consistent naming for Devanagari layouts
2023-03-11 16:43:17 +01:00
Jules Aguillon
bac228e6fb Add extra keys for Ukrainian 2023-03-05 23:36:15 +01:00
Jules Aguillon
d7e4840f4d Add support for Belarusian
It uses the russian layout with placed extra keys.
2023-03-05 23:34:26 +01:00
Jules Aguillon
18d3fd3c84 Refactor: Remove KeyboardData.Corner
The Corner class is removed. The "localized" flag for all the corners is
held in a bitfield.
2023-03-05 23:08:35 +01:00
Jules Aguillon
c56ad425f6 Remove the 'edgekeys' attribute 2023-03-05 20:08:56 +01:00
Jules Aguillon
a6fe5cae00 Allow 8 symbols per key
'Keyboard.Key' now contains an array of size 9, giving each keyvalue an
index. The algorithm for finding the nearest key during a swipe now
needs 16 segments, which are now calculated as an angle.

The algorithm does one more interation instead of 2 more, slightly
reducing the sensitivity of corner values. The 'getAtDirection' function
is moved into the Pointers class to clearly separate the two systems.

The 'edgekey' attribute is now obsolete but is kept for compatibility.
The flag is removed internally, key index are simply translated.
Similarly, the 'slider' attribute now act on keys at index 5 and 6
instead of 2 and 3.
2023-03-03 19:44:05 +01:00
Jules Aguillon
1f9e92ed60 Fix caps lock stopped by auto-capitalisation
Auto-capitalisation triggers when the backspace key is used. Make sure
to not remove a locked shift pointer.
2023-03-02 11:40:22 +01:00
Jules Aguillon
0da02d60c4 Do not remove numpad keys from the layout
This removes keys like '.' and '-' from their usual place, which is
pretty annoying.

The feature is retained for the number row.
2023-03-02 10:57:58 +01:00
Edgars
70754aa3eb Update LV translation 2023-03-02 10:41:46 +01:00
Jules Aguillon
2244c46af1 Allow key and keyboard opacity to be 0 2023-02-26 11:52:10 +01:00
Jules Aguillon
798494e701 Fix miscalculated keyboard height with number row
The 'keysHeight' field needs to be updated. As this class is not
intended to be mutable, copy the list of rows and call the constructor.

Also remove an unecessary component of the keyboard height calculation.
2023-02-26 11:31:08 +01:00
mscheidemann
0d902aa334 Update values-de/strings.xml (#295)
Missing German translation completed
2023-02-26 09:54:47 +01:00
Jules Aguillon
91f27a1432 Update translations
Outdated since 0f62b30
2023-02-26 09:49:06 +01:00
JackDotJS
9523b158b3 Add theme "Alternative Black" (#297)
* Add alternative black theme
2023-02-26 09:47:31 +01:00
Jules Aguillon
2ca7b4427d Release 1.21.0 (32) 2023-02-12 23:38:37 +01:00
Jules Aguillon
0f62b3044c Option to switch to the previous input method
A new option changes the "change_method" into the new
"change_method_prev". It switch to the previously used input method.

A long press on "change_method_prev" sends "change_method".

A new section is added in the settings and existing options are moved.
2023-02-12 23:20:11 +01:00
Jules Aguillon
c46e3b6c61 Modify keys after a long press 2023-02-12 23:14:57 +01:00
Kazoku
5fac3459aa Added missing accent that can combine with horn_accent (#293) 2023-02-09 23:38:55 +01:00
Kazoku
b54f9c5797 Vietnamese keyboard (#291)
Added missing accent (horn, hook, dot below)
Added layout
Added accent font svg (by modified existing accent)
2023-02-09 18:40:48 +01:00
Jules Aguillon
72249b8a42 Fix arrow keys not repeating
The special handling of arrow keys have been removed in 854eff2. Key
repeat was not starting when the key0 was empty.
2023-02-08 22:38:01 +01:00
rVnPower
82b2bf6dfb Complete Vietnamese translation (#292) 2023-02-08 16:35:44 +01:00
Ram Kromberg
0fe27ef486 Add theme 'ePaper' (#287)
* Add theme 'ePaper'
2023-01-31 20:11:36 +01:00
Ram Kromberg
51ce2ccdf1 Add layouts 'he_il_1452_1' and 'he_il_1452_2' 2023-01-31 20:07:30 +01:00
Jules Aguillon
eb0df72ba1 Update French translation 2023-01-31 00:07:17 +01:00
Jules Aguillon
540384bb0a Add optional number row
An option is added to enable an extra number row at the top of the
keyboard. Digits are removed from the keyboard while the number row is
visible.
2023-01-30 23:58:47 +01:00
Jules Aguillon
c7184303e9 Remove the digits when numpad is visible 2023-01-30 23:54:39 +01:00
Jules Aguillon
78a461f740 Modification step for the special layout
Refactor, follow up of 90b7944. Add a modification step to the "special"
layouts: numpad, greekmath, pin entry.

Remove the apply_key0 function, which is not expressive enough.
Add an enum instead of yet an other "switch_" function.
2023-01-30 23:46:02 +01:00
Jules Aguillon
90b7944129 Apply modify_layout to text layout only
Refactor. Allows to remove the 'extra_keys' and 'num_pad' flags and to
implement more complicated transformations to the layouts.
2023-01-30 22:33:01 +01:00
Jules Aguillon
2539feadcd Fix placeholder key not replaced
Since fecc4dd, placeholder keys can't be compared by reference.
Add a placeholder kind and defined placeholder values.
2023-01-30 21:29:59 +01:00
Jules Aguillon
5f283cd0cd Slightly increase the width of the spacebar
The left and right arrows are less often needed and the key can be
shorter.
2023-01-29 19:46:56 +01:00
Jules Aguillon
fecc4dd70a Remove the explicit hashmap in KeyValue
Refactoring. Predefined keys are represented by a big switch statement
rather than added into a hashmap.
2023-01-29 19:38:54 +01:00
Jules Aguillon
7bc93c470e Don't send event at end of sliding
A sliding pointer going up must not cause a key event to be sent. This
caused an extra cursor movement and cleared the latched modifiers.
2023-01-29 18:49:44 +01:00
Jules Aguillon
854eff211d Move cursor by sliding on the space bar
Send key events for the left or right arrow as the finger slides on the
space bar.
Can be used to select text by holding shift. Works under Termux.

Events are sent linearly as the finger travels. The distance between
each events is defined from the swiping distance divided by 4.

'slider="true"' can be set on a key that have 'edgekeys="true"'.
'key2' and 'key3' represent the right and left keys.
2023-01-22 23:21:21 +01:00
Jules Aguillon
f4032e3be9 Remove the modulated repeat
It allowed to modulate the repeat speed of some keys (arrow, backspace,
delete) by move the finger farther or closer to the key.

In practice, this wasn't pratical and doesn't seem popular. It is
removed in favor of a better mechanism for moving the cursor.
2023-01-22 23:20:04 +01:00
Maki Nishikino
f7f4d4d6aa Update russian strings.xml (#280) 2023-01-21 15:56:32 +01:00
59 changed files with 1624 additions and 713 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="juloo.keyboard2" android:versionCode="31" android:versionName="1.20.2" android:hardwareAccelerated="false">
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="31"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="juloo.keyboard2" android:versionCode="34" android:versionName="1.22.1" android:hardwareAccelerated="false">
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="33"/>
<application android:label="@string/app_name" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:hardwareAccelerated="false">
<service android:name="juloo.keyboard2.Keyboard2" android:label="@string/app_name" android:permission="android.permission.BIND_INPUT_METHOD" android:exported="true" android:directBootAware="true">
<intent-filter>
@@ -13,6 +13,12 @@
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
<activity android:name="juloo.keyboard2.LauncherActivity" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/android:Theme.DeviceDefault" android:exported="true" android:directBootAware="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

View File

@@ -0,0 +1,10 @@
New translations: Vietnamese
New layouts: Hebrew, Vietnamese
Move the cursor by sliding on the space bar.
New ePaper theme.
Added number row.
Option to switch to the previous keyboard.
Updated translations.
Thanks to the contributors: @K4zoku, @rVnPower, @RamKromberg, @MAKI1LOVE

View File

@@ -0,0 +1,7 @@
New layouts: Arabic, Devanagari
Updated translations.
Updated layouts.
Bugs fixed.
Thanks to the contributors: @ChasmSolacer, @mostafaayesh, @lrvideckis, @eandersons, @mscheidemann, @JackDotJS

View File

@@ -0,0 +1,3 @@
Bug fixes.
Thanks to the contributors: @doak

View File

@@ -1,18 +1,16 @@
Ta aplikacja to klawiatura wirtualna dla Androida. Jej główne funkcjonalności obejmują łatwe wprowadzanie każdego znaku ASCII przy użyciu gestu przesunięcia, martwe klawisze dla znaków diakrytycznych i klawisze modyfikujące oraz obecność klawiszy specjalnych (tab, esc, strzałki, itp.).
Klawiatura mieści do czterech dodatkowych znaków w rogach każdego klawisza. Są one wprowadzane poprzez przesuwanie palcem po klawiszu.
Jej główną cechą jest łatwość wprowadzania wielu znaków poprzez przesuwanie po klawiszu do rogu.
Wyróźnione funkcjonalności:
- Wszystkie znaki i klawisze specjalne, które są również dostępne na klawiaturze komputerowej. Doskonałe do korzystania z aplikacji takich jak Termux.
- Wszystkie znaki i klawisze specjalne dostępne na klawiaturze komputerowej. Doskonałe do korzystania z aplikacji takich jak Termux.
- Obejmują one Tab, Esc, strzałki, klawisze funkcyjne oraz Ctrl i Alt !
- Obejmują one Tab, Esc, strzałki, klawisze funkcyjne, a także Ctrl i Alt.
- Znaki akcentowane uzyskuje się za pomocą martwych klawiszy. Najpierw naciśnij akcent, a następnie wpisz akcentowaną literę.
- Bardzo lekka i szybka. Zajmuje 500x mniej miejsca niż klawiatura Google i 15x mniej niż klawiatura domyślna. Bez reklam, bez śledzenia.
- Wiele układów: QWERTY, QWERTZ, AZERTY. Motywy: Biały, Ciemny, Czarny (OLED). Oraz wiele innych możliwości.
- Wiele układów: QWERTY, QWERTZ, AZERTY. Motywy: Biały, Ciemny, Czarny (OLED). Oraz wiele innych ustawień.
Tak jak każda inna klawiatura ekranowa, należy ją włączyć w ustawieniach systemowych. Otwórz Ustawienia i przejdź kolejno do:
System > Języki i metody wprowadzania > Klawiatura ekranowa > Zarządzaj klawiaturami ekranowymi.

View File

@@ -1 +1 @@
Lekka klawiatura wirtualna dla programistów.
Lekka klawiatura wirtualna dla programistów.

View File

@@ -0,0 +1,16 @@
Chức năng chính là dễ dàng gõ nhiều ký tự bằng cách kéo phím về góc của nó.
Các chức năng tiêu biểu:
- Chứa tất cả ký tự và phím cơ bản lẫn đặc biệt của một cái bàn phím máy tính. Hoàn hảo cho các ứng dụng như Termux.
- Bao gồm Tab, Esc, các phím mũi tên và phím chức năng, còn có thêm Ctrl và Alt.
- Các phím có dấu phụ có thể được sử dụng qua phím liệt. Đầu tiên là bật dấu phụ, sau đó thì gõ.
- Rất nhẹ và nhanh. Nhẹ hơn bàn phím của Google 500 lần và 15 lần bàn phím mặc định. Không quảng cáo, không theo dõi.
- Nhiều bố cục phím: QWERTY, QWERTZ, AZERTY. Nhiều chủ đề: Sáng, tối, đen OLED. Với nhiều lựa chọn khác.
Như các bàn phím ảo khác, nó phải được bật trong cài đặt. Đầu tiên là vào cài đặt hệ thống và đi đến:
Hệ thống -> Ngôn ngữ và nhập liệu -> Bàn phím ảo -> Quản lý bàn phím ảo

View File

@@ -0,0 +1 @@
Bàn phím ảo gọn nhẹ cho các nhà phát triển.

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical">
<TextView style="@style/paragraph" android:text="@string/launcher_description"/>
<Button style="@style/paragraph" android:text="@string/launcher_button_imesettings" android:onClick="launch_imesettings" android:layout_width="wrap_content"/>
<TextView style="@style/paragraph" android:text="@string/launcher_sourcecode" android:autoLink="web"/>
<TextView android:id="@+id/launcher_tryhere_text" style="@style/paragraph" android:text="@string/launcher_tryhere"/>
<EditText android:id="@+id/launcher_tryhere_area" style="@style/paragraph" android:inputType="text"/>
</LinearLayout>

View File

@@ -21,11 +21,11 @@
<!-- <string name="pref_show_numpad_never">Never</string> -->
<!-- <string name="pref_show_numpad_landscape">Only in landscape mode</string> -->
<!-- <string name="pref_show_numpad_always">Always</string> -->
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<string name="pref_autocapitalisation_title">Automatická kapitalizace</string>
<string name="pref_autocapitalisation_summary">Stiskne Shift na začátku věty</string>
<!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> -->
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<string name="pref_second_layout_none">Žádné</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Jak daleko je třeba posunout prst pro napsaní znaku/diakritiky v rozích klávey (%s)</string>
<string name="pref_long_timeout_title">Časová prodleva opakování znaků</string>
<string name="pref_long_interval_title">Interval opakování znaků</string>
<string name="pref_vibrate_title">Vibrace</string>
<string name="pref_vibrate_summary">Zapnout/Vypnout vibrace při stisku klávesy</string>
<string name="pref_precise_repeat_title">Precizní posun kurzoru</string>
<string name="pref_precise_repeat_summary">Zda-li posun prstem ovlivňuje rychlost kurzoru</string>
<string name="pref_lock_double_tap_title">Dvojklik pro aktivaci caps lock(u)</string>
<string name="pref_lock_double_tap_summary">Dvojklik namísto držení modifikačních kláves po nějakou dobu</string>
<!-- <string name="pref_category_behavior">Behavior</string> -->
<string name="pref_autocapitalisation_title">Automatická kapitalizace</string>
<string name="pref_autocapitalisation_summary">Stiskne Shift na začátku věty</string>
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">Vibrace</string>
<string name="pref_vibrate_summary">Zapnout/Vypnout vibrace při stisku klávesy</string>
<string name="pref_category_style">Styl</string>
<string name="pref_margin_bottom_title">Spodní odsazení</string>
<string name="pref_keyboard_height_title">Výška klávesnice</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Tmavý</string>
<string name="pref_theme_e_light">Světlý</string>
<string name="pref_theme_e_black">Černý</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<!-- <string name="pref_theme_e_white">White</string> -->
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">Velmi krátká</string>
<string name="pref_swipe_dist_e_short">Krátká</string>
<string name="pref_swipe_dist_e_default">Běžná</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Předchozí</string>
<string name="key_action_search">Hledat</string>
<string name="key_action_send">Odeslat</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -3,16 +3,16 @@
<string name="app_name" product="debug">Unexpected Keyboard (Debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Unexpected Keyboard - Einstellungen</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_portrait">Im Hochformatmodus</string>
<string name="pref_landscape">Im Querformatmodus</string>
<string name="pref_category_layout">Layout</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
<!-- <string name="pref_key_opacity">Adjust key opacity</string> -->
<!-- <string name="pref_key_activated_opacity">Adjust pressed key opacity</string> -->
<string name="pref_label_brightness">Helligkeit der Beschriftung anpassen</string>
<string name="pref_keyboard_opacity">Deckkraft des Tastaturhintergrunds anpassen</string>
<string name="pref_key_opacity">Deckkraft der Tasten anpassen</string>
<string name="pref_key_activated_opacity">Deckkraft gedrückter Tasten anpassen</string>
<string name="pref_layout_title">Tastaturlayout ändern</string>
<string name="pref_layout_e_system">Systemeinstellung</string>
<!-- <string name="pref_layout_e_custom">Custom layout</string> -->
<string name="pref_layout_e_custom">Eigenes Layout</string>
<string name="pref_accents_title">Akzente</string>
<string name="pref_accents_e_all_installed">Akzente für alle installierten Sprachen anzeigen</string>
<string name="pref_accents_e_selected">Akzente nur für die gewählte Sprache anzeigen</string>
@@ -21,37 +21,42 @@
<string name="pref_show_numpad_never">Nie</string>
<string name="pref_show_numpad_landscape">Nur im Querformat</string>
<string name="pref_show_numpad_always">Immer</string>
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<string name="pref_autocapitalisation_title">Automatische Großschreibung</string>
<string name="pref_autocapitalisation_summary">Shift-Taste am Satzanfang aktivieren</string>
<string name="pref_number_row_title">Zahlenreihe anzeigen</string>
<string name="pref_number_row_summary">Eine Zahlenreihe oben an der Tastatur hinzufügen, wenn der Ziffernblock ausgeblendet ist</string>
<string name="pref_numpad_layout">Zahlenblock-Layout</string>
<string name="pref_numpad_layout_e_high_first">Hohe Ziffern zuerst</string>
<string name="pref_numpad_layout_e_low_first">Niedrige Ziffern zuerst</string>
<string name="pref_extra_keys_title">Zusätzliche Zeichen zur Tastatur hinzufügen</string>
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<string name="pref_second_layout_title">Zweites Layout</string>
<string name="pref_second_layout_none">Keines</string>
<string name="pref_category_typing">Tippen</string>
<string name="pref_swipe_dist_title">Länge der Wischgeste</string>
<string name="pref_swipe_dist_summary">Abstand der Zeichen in den Ecken der Tasten (%s)</string>
<string name="pref_long_timeout_title">Zeitüberschreitung bei Tastenwiederholung</string>
<string name="pref_long_interval_title">Intervall der Tastenwiederholung</string>
<string name="pref_vibrate_title">Vibration</string>
<string name="pref_vibrate_summary">Vibration bei Tastendruck ein-/ausschalten</string>
<string name="pref_precise_repeat_title">Präzise Cursorsteuerung</string>
<string name="pref_precise_repeat_summary">Geschwindigkeit der Tastenwiederholung durch weniger oder mehr Wischen anpassen</string>
<string name="pref_lock_double_tap_title">Umschalttaste mit Doppeltippen einrasten</string>
<string name="pref_lock_double_tap_summary">Anstatt Taste längere Zeit gedrückt zu halten</string>
<string name="pref_category_behavior">Verhalten</string>
<string name="pref_autocapitalisation_title">Automatische Großschreibung</string>
<string name="pref_autocapitalisation_summary">Umschalttaste am Satzanfang aktivieren</string>
<string name="pref_switch_input_immediate_title">Sofort zur nächsten Tastatur wechseln</string>
<string name="pref_switch_input_immediate_summary">Verhalten der Tastaturumschalttaste</string>
<string name="pref_vibrate_title">Vibration</string>
<string name="pref_vibrate_summary">Vibration bei Tastendruck ein-/ausschalten</string>
<string name="pref_category_style">Design</string>
<string name="pref_margin_bottom_title">Unterer Abstand</string>
<string name="pref_keyboard_height_title">Höhe der Tastatur</string>
<string name="pref_horizontal_margin_title">Horizontaler Abstand</string>
<string name="pref_character_size_title">Größe der Beschriftung</string>
<string name="pref_character_size_summary">Größe der Buchstaben auf den Tasten (%.2fx)</string>
<string name="pref_theme">Theme</string>
<string name="pref_theme">Thema</string>
<string name="pref_theme_e_system">Systemeinstellung</string>
<string name="pref_theme_e_dark">Dunkel</string>
<string name="pref_theme_e_light">Hell</string>
<string name="pref_theme_e_black">Schwarz</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<string name="pref_theme_e_white">Weiß</string>
<string name="pref_theme_e_epaper">ePaper</string>
<string name="pref_swipe_dist_e_very_short">Sehr kurz</string>
<string name="pref_swipe_dist_e_short">Kurz</string>
<string name="pref_swipe_dist_e_default">Normal</string>
@@ -59,13 +64,17 @@
<string name="pref_swipe_dist_e_very_far">Sehr weit</string>
<string name="pref_key_horizontal_space">Horizontaler Abstand zwischen den Tasten</string>
<string name="pref_key_vertical_space">Vertikaler Abstand zwischen den Tasten</string>
<!-- <string name="pref_category_advanced">Advanced</string> -->
<!-- <string name="pref_custom_layout_title">Custom layout</string> -->
<!-- <string name="pref_custom_layout_summary">See the source code. This option is not meant to be used.</string> -->
<string name="pref_category_advanced">Erweitert</string>
<string name="pref_custom_layout_title">Eigenes Layout</string>
<string name="pref_custom_layout_summary">Bitte Sourcecode ansehen. Diese Option ist nicht zur Verwendung vorgesehen.</string>
<string name="key_action_next">Nächstes</string>
<string name="key_action_done">Fertig</string>
<string name="key_action_go">Los</string>
<string name="key_action_prev">Vorheriges</string>
<string name="key_action_search">Suchen</string>
<string name="key_action_send">Senden</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -21,11 +21,11 @@
<!-- <string name="pref_show_numpad_never">Never</string> -->
<!-- <string name="pref_show_numpad_landscape">Only in landscape mode</string> -->
<!-- <string name="pref_show_numpad_always">Always</string> -->
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<!-- <string name="pref_autocapitalisation_title">Automatic capitalisation</string> -->
<!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> -->
<!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> -->
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<!-- <string name="pref_second_layout_none">None</string> -->
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Distancia de caracteres en las esquinas de las letras (%s)</string>
<string name="pref_long_timeout_title">Tiempo de espera de repetición de tecla</string>
<string name="pref_long_interval_title">Intervalo de repetición de tecla</string>
<string name="pref_vibrate_title">Vibración</string>
<string name="pref_vibrate_summary">Habilitar/deshabilitar vibración al presionar una tecla</string>
<string name="pref_precise_repeat_title">Movimientos de cursor preciso</string>
<string name="pref_precise_repeat_summary">Modular la velocidad de repetición de teclas según si se desliza más o menos</string>
<!-- <string name="pref_lock_double_tap_title">Double tap on shift for caps lock</string> -->
<!-- <string name="pref_lock_double_tap_summary">You can lock any modifier by holding it</string> -->
<!-- <string name="pref_category_behavior">Behavior</string> -->
<!-- <string name="pref_autocapitalisation_title">Automatic capitalisation</string> -->
<!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> -->
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">Vibración</string>
<string name="pref_vibrate_summary">Habilitar/deshabilitar vibración al presionar una tecla</string>
<string name="pref_category_style">Estilo</string>
<string name="pref_margin_bottom_title">Margen del pie</string>
<string name="pref_keyboard_height_title">Altura del teclado</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Oscuro</string>
<string name="pref_theme_e_light">Claro</string>
<string name="pref_theme_e_black">Negro</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<!-- <string name="pref_theme_e_white">White</string> -->
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">Muy corto</string>
<string name="pref_swipe_dist_e_short">Corto</string>
<string name="pref_swipe_dist_e_default">Normal</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Anterior</string>
<string name="key_action_search">Buscar</string>
<string name="key_action_send">Enviar</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> -->
<!-- <string name="app_name" product="default">Unexpected Keyboard</string> -->
<string name="app_name" product="debug">Unexpected Keyboard (debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Unexpected Keyboard Paramètres</string>
<string name="pref_portrait">En mode portrait</string>
<string name="pref_landscape">En mode landscape</string>
<string name="pref_category_layout">Disposition</string>
<string name="pref_label_brightness">Luminosité des symboles</string>
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
<!-- <string name="pref_key_opacity">Adjust key opacity</string> -->
<!-- <string name="pref_key_activated_opacity">Adjust pressed key opacity</string> -->
<string name="pref_keyboard_opacity">Transparence du clavier</string>
<string name="pref_key_opacity">Transparence des touches</string>
<string name="pref_key_activated_opacity">Transparence des touches pressées</string>
<string name="pref_layout_title">Disposition des touches</string>
<string name="pref_layout_e_system">Paramètre système</string>
<string name="pref_layout_e_custom">Disposition personnalisée</string>
@@ -21,11 +21,11 @@
<string name="pref_show_numpad_never">Jamais</string>
<string name="pref_show_numpad_landscape">Seulement en mode paysage</string>
<string name="pref_show_numpad_always">Toujour</string>
<string name="pref_number_row_title">Rangée de nombres</string>
<string name="pref_number_row_summary">Ajoute une rangée de nombres en haut du clavier quand le pavé numérique est caché</string>
<string name="pref_numpad_layout">Disposition du pavé numérique</string>
<string name="pref_numpad_layout_e_high_first">Du plus haut au plus bas</string>
<string name="pref_numpad_layout_e_low_first">Du plus bas au plus haut</string>
<string name="pref_autocapitalisation_title">Majuscule automatique</string>
<string name="pref_autocapitalisation_summary">Activer Shift au début des phrases</string>
<string name="pref_extra_keys_title">Ajouter des touches au clavier</string>
<string name="pref_second_layout_title">Disposition secondaire</string>
<string name="pref_second_layout_none">Aucune</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">La distance des caractères dans les coins (%s)</string>
<string name="pref_long_timeout_title">Délai avant répétition</string>
<string name="pref_long_interval_title">Écart entre les répétitions</string>
<string name="pref_vibrate_title">Vibreur</string>
<string name="pref_vibrate_summary">Vibration a chaque touche</string>
<string name="pref_precise_repeat_title">Mouvement précis du curseur</string>
<string name="pref_precise_repeat_summary">Modifier la vitesse de répétition en bougeant le doigt</string>
<string name="pref_lock_double_tap_title">Appuyer deux fois pour bloquer la majuscule</string>
<string name="pref_lock_double_tap_summary">Un appui long bloque la majuscule</string>
<string name="pref_category_behavior">Comportement</string>
<string name="pref_autocapitalisation_title">Majuscule automatique</string>
<string name="pref_autocapitalisation_summary">Activer Shift au début des phrases</string>
<string name="pref_switch_input_immediate_title">Changer vers le clavier utilisé en dernier</string>
<string name="pref_switch_input_immediate_summary">Comportement de la touche de changement de clavier</string>
<string name="pref_vibrate_title">Vibreur</string>
<string name="pref_vibrate_summary">Vibration a chaque touche</string>
<string name="pref_category_style">Style</string>
<string name="pref_margin_bottom_title">Marge du bas</string>
<string name="pref_keyboard_height_title">Hauteur du clavier</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Sombre</string>
<string name="pref_theme_e_light">Clair</string>
<string name="pref_theme_e_black">Noir</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<string name="pref_theme_e_white">Blanc</string>
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">Très courte</string>
<string name="pref_swipe_dist_e_short">Courte</string>
<string name="pref_swipe_dist_e_default">Normale</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Prec.</string>
<string name="key_action_search">Chercher</string>
<string name="key_action_send">Envoyer</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -21,11 +21,11 @@
<!-- <string name="pref_show_numpad_never">Never</string> -->
<!-- <string name="pref_show_numpad_landscape">Only in landscape mode</string> -->
<!-- <string name="pref_show_numpad_always">Always</string> -->
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<string name="pref_autocapitalisation_title">Maiuscole Automatiche</string>
<string name="pref_autocapitalisation_summary">Premi Shift all\'inizio di una frase</string>
<!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> -->
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<string name="pref_second_layout_none">Nessuno</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Distanza dei caratteri negli angoli dei tasti (%s)</string>
<string name="pref_long_timeout_title">Timeout ripetizione tasto</string>
<string name="pref_long_interval_title">Intervallo ripetizione tasto</string>
<string name="pref_vibrate_title">Vibrazione</string>
<string name="pref_vibrate_summary">Abilita/Disabilita Vibrazione alla pressione dei tasti</string>
<string name="pref_precise_repeat_title">Movimento puntatore preciso</string>
<string name="pref_precise_repeat_summary">Modula la veocità della ripetizione con lo swipe</string>
<string name="pref_lock_double_tap_title">Doppio tocco su Shift per attivare CapsLock</string>
<string name="pref_lock_double_tap_summary">Invece di premere i modificatori a lungo</string>
<!-- <string name="pref_category_behavior">Behavior</string> -->
<string name="pref_autocapitalisation_title">Maiuscole Automatiche</string>
<string name="pref_autocapitalisation_summary">Premi Shift all\'inizio di una frase</string>
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">Vibrazione</string>
<string name="pref_vibrate_summary">Abilita/Disabilita Vibrazione alla pressione dei tasti</string>
<string name="pref_category_style">Stile</string>
<string name="pref_margin_bottom_title">Margine inferiore</string>
<string name="pref_keyboard_height_title">Altezza tastiera</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Scuro</string>
<string name="pref_theme_e_light">Chiaro</string>
<string name="pref_theme_e_black">Nero</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<!-- <string name="pref_theme_e_white">White</string> -->
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">Veramente breve</string>
<string name="pref_swipe_dist_e_short">Breve</string>
<string name="pref_swipe_dist_e_default">Normale</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Precedente</string>
<string name="key_action_search">Cerca</string>
<string name="key_action_send">Invia</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -21,11 +21,11 @@
<!-- <string name="pref_show_numpad_never">Never</string> -->
<!-- <string name="pref_show_numpad_landscape">Only in landscape mode</string> -->
<!-- <string name="pref_show_numpad_always">Always</string> -->
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<!-- <string name="pref_autocapitalisation_title">Automatic capitalisation</string> -->
<!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> -->
<!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> -->
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<!-- <string name="pref_second_layout_none">None</string> -->
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">키 모서리 문자의 입력 범위 (%s)</string>
<string name="pref_long_timeout_title">키 길게 누르기 지연</string>
<string name="pref_long_interval_title">키 반복 간격</string>
<string name="pref_vibrate_title">진동</string>
<string name="pref_vibrate_summary">키 누를 때 진동 키거/끄기</string>
<string name="pref_precise_repeat_title">정확한 커서 움직임</string>
<string name="pref_precise_repeat_summary">더 많거나 적은 스와이프로 키 반복 조절</string>
<!-- <string name="pref_lock_double_tap_title">Double tap on shift for caps lock</string> -->
<!-- <string name="pref_lock_double_tap_summary">You can lock any modifier by holding it</string> -->
<!-- <string name="pref_category_behavior">Behavior</string> -->
<!-- <string name="pref_autocapitalisation_title">Automatic capitalisation</string> -->
<!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> -->
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">진동</string>
<string name="pref_vibrate_summary">키 누를 때 진동 키거/끄기</string>
<string name="pref_category_style">스타일</string>
<string name="pref_margin_bottom_title">아래 넓이</string>
<string name="pref_keyboard_height_title">키보드 높이</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Dark</string>
<string name="pref_theme_e_light">Light</string>
<string name="pref_theme_e_black">Black</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<!-- <string name="pref_theme_e_white">White</string> -->
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">매우 짧음</string>
<string name="pref_swipe_dist_e_short">짧음</string>
<string name="pref_swipe_dist_e_default">보통</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">이전</string>
<string name="key_action_search">검색</string>
<string name="key_action_send">보내기</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -3,16 +3,16 @@
<string name="app_name" product="debug">Unexpected Keyboard (atkļūdošana)</string>
<string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Unexpected Keyboard iestatījumi</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_portrait">Stateniski</string>
<string name="pref_landscape">Guleniski</string>
<string name="pref_category_layout">Izkārtojums</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
<!-- <string name="pref_key_opacity">Adjust key opacity</string> -->
<!-- <string name="pref_key_activated_opacity">Adjust pressed key opacity</string> -->
<string name="pref_label_brightness">Pielāgot iezīmju spilgtumu</string>
<string name="pref_keyboard_opacity">Pielāgot tastatūras fona necaurredzamību</string>
<string name="pref_key_opacity">Pielāgot taustiņu necaurredzamību</string>
<string name="pref_key_activated_opacity">Pielāgot piespiesta taustiņa necaurredzamību</string>
<string name="pref_layout_title">Mainīt tastatūras izkārtojumu</string>
<string name="pref_layout_e_system">Ierīces iestatījumi</string>
<!-- <string name="pref_layout_e_custom">Custom layout</string> -->
<string name="pref_layout_e_custom">Pielāgots izkārtojums</string>
<string name="pref_accents_title">Uzsvara zīmes</string>
<string name="pref_accents_e_all_installed">Rādīt uzsvara zīmes visām uzstādītajām valodām</string>
<string name="pref_accents_e_selected">Rādīt uzsvara zīmes tikai atlasītajām valodām</string>
@@ -21,25 +21,28 @@
<string name="pref_show_numpad_never">Nekad</string>
<string name="pref_show_numpad_landscape">Tikai guleniskajā skatā</string>
<string name="pref_show_numpad_always">Vienmēr</string>
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<string name="pref_autocapitalisation_title">Automātiski lielie burti</string>
<string name="pref_autocapitalisation_summary">Piespiest Shift teikuma sākumā</string>
<string name="pref_number_row_title">Rādīt ciparu rindu</string>
<string name="pref_number_row_summary">Pievienot ciparu rindu virs tastatūras, kad ciparnīca ir paslēpta</string>
<string name="pref_numpad_layout">Ciparnīcas izkārtojums</string>
<string name="pref_numpad_layout_e_high_first">Vispirms lielākie cipari</string>
<string name="pref_numpad_layout_e_low_first">Vispirms mazākie cipari</string>
<string name="pref_extra_keys_title">Pievienot tastatūrai taustiņus</string>
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<string name="pref_second_layout_title">Otrējais izkārtojums</string>
<string name="pref_second_layout_none">Neviens</string>
<string name="pref_category_typing">Rakstīšana</string>
<string name="pref_swipe_dist_title">Pavilkšanas attālums</string>
<string name="pref_swipe_dist_summary">Taustiņu stūros esošo rakstzīmju attālums (%s)</string>
<string name="pref_long_timeout_title">Taustiņa atkārtošanās ātrums</string>
<string name="pref_long_interval_title">Taustiņa atkārtošanās aizture</string>
<string name="pref_vibrate_title">Trīcēšana</string>
<string name="pref_vibrate_summary">Iespējot/atspējot taustiņa piespiešanas trīcēšanu</string>
<string name="pref_precise_repeat_title">Pielāgojama kursora kustība</string>
<string name="pref_precise_repeat_summary">Mainīt taustiņa atkārtošanās ātrumu ar pavilkšanas attālumu</string>
<string name="pref_lock_double_tap_title">Divkāršs piesitiens burtslēgam</string>
<string name="pref_lock_double_tap_summary">Tā vietā, lai ilstoši piespiestu pārveidotāju</string>
<string name="pref_category_behavior">Uzvedība</string>
<string name="pref_autocapitalisation_title">Automātiski lielie burti</string>
<string name="pref_autocapitalisation_summary">Piespiest Shift teikuma sākumā</string>
<string name="pref_switch_input_immediate_title">Pārslēgties uz pēdējo izmantoto tastatūru</string>
<string name="pref_switch_input_immediate_summary">Tastatūras pārslēgšanas taustiņa uzvedība</string>
<string name="pref_vibrate_title">Trīcēšana</string>
<string name="pref_vibrate_summary">Iespējot/atspējot taustiņa piespiešanas trīcēšanu</string>
<string name="pref_category_style">Izskata pielāgojumi</string>
<string name="pref_margin_bottom_title">Apakšējā apmale</string>
<string name="pref_keyboard_height_title">Tastatūras augstums</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Tumšs</string>
<string name="pref_theme_e_light">Gaišs</string>
<string name="pref_theme_e_black">Melns</string>
<string name="pref_theme_e_altblack">Citādi melns</string>
<string name="pref_theme_e_white">Balts</string>
<string name="pref_theme_e_epaper">ePapīrs</string>
<string name="pref_swipe_dist_e_very_short">Ļoti tuvs</string>
<string name="pref_swipe_dist_e_short">Tuvs</string>
<string name="pref_swipe_dist_e_default">Vidējs</string>
@@ -59,13 +64,17 @@
<string name="pref_swipe_dist_e_very_far">Ļoti tāls</string>
<string name="pref_key_horizontal_space">Līmeniskais attālums starp taustiņiem</string>
<string name="pref_key_vertical_space">Stateniskais attālums starp taustiņiem</string>
<!-- <string name="pref_category_advanced">Advanced</string> -->
<!-- <string name="pref_custom_layout_title">Custom layout</string> -->
<!-- <string name="pref_custom_layout_summary">See the source code. This option is not meant to be used.</string> -->
<string name="pref_category_advanced">Papildu</string>
<string name="pref_custom_layout_title">Pielāgots izkārtojums</string>
<string name="pref_custom_layout_summary">Skatīt pirmkodu. Šī iespēja nav paredzēta izmantošanai.</string>
<string name="key_action_next">Nākamais</string>
<string name="key_action_done">Darīts</string>
<string name="key_action_go">Aiziet</string>
<string name="key_action_prev">Iepriekšējais</string>
<string name="key_action_search">Meklēt</string>
<string name="key_action_send">Sūtīt</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -3,8 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Ustawienia Unexpected Keyboard</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_portrait">W widoku pionowym</string>
<string name="pref_landscape">W widoku poziomym</string>
<string name="pref_category_layout">Układ</string>
<string name="pref_label_brightness">Dostosuj jasność znaków</string>
<string name="pref_keyboard_opacity">Nieprzezroczystość tła klawiatury</string>
@@ -21,11 +21,11 @@
<string name="pref_show_numpad_never">Nigdy</string>
<string name="pref_show_numpad_landscape">Tylko w orientacji poziomej</string>
<string name="pref_show_numpad_always">Zawsze</string>
<string name="pref_number_row_title">Pokaż rząd cyfr</string>
<string name="pref_number_row_summary">Dodaj rząd cyfr na górze klawiatury, kiedy klaw. numeryczna jest schowana</string>
<string name="pref_numpad_layout">Układ klawiatury numerycznej</string>
<string name="pref_numpad_layout_e_high_first">Od największej cyfry</string>
<string name="pref_numpad_layout_e_low_first">Od najmniejszej cyfry</string>
<string name="pref_autocapitalisation_title">Automatyczne wielkie litery</string>
<string name="pref_autocapitalisation_summary">Naciśnij Shift na początku zdania</string>
<string name="pref_extra_keys_title">Dodaj klawisze do klawiatury</string>
<string name="pref_second_layout_title">Drugi układ</string>
<string name="pref_second_layout_none">Żaden</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Odległość znaków od rogów klawiszy (%s)</string>
<string name="pref_long_timeout_title">Opóźnienie powtarzania naciśnięć klawisza</string>
<string name="pref_long_interval_title">Czas pomiędzy powtórzeniami</string>
<string name="pref_vibrate_title">Wibracja</string>
<string name="pref_vibrate_summary">Wł./wył. wibrację przy naciśnięciu klawisza</string>
<string name="pref_precise_repeat_title">Dokładne poruszanie kursorem</string>
<string name="pref_precise_repeat_summary">Reguluj prędkość powtarzania naciśnięć klawisza poprzez przesunięcie dalej lub bliżej</string>
<string name="pref_lock_double_tap_title">Naciśnij Shift podwójnie, aby włączyć caps lock</string>
<string name="pref_lock_double_tap_summary">Możesz zablokować modyfikator poprzez jego długie naciśnięcie</string>
<string name="pref_category_behavior">Zachowanie</string>
<string name="pref_autocapitalisation_title">Automatyczne wielkie litery</string>
<string name="pref_autocapitalisation_summary">Naciśnij Shift na początku zdania</string>
<string name="pref_switch_input_immediate_title">Przełącz na ostatnio używaną klawiaturę</string>
<string name="pref_switch_input_immediate_summary">Działanie klawisza przełączającego klawiaturę</string>
<string name="pref_vibrate_title">Wibracja</string>
<string name="pref_vibrate_summary">Wł./wył. wibrację przy naciśnięciu klawisza</string>
<string name="pref_category_style">Styl</string>
<string name="pref_margin_bottom_title">Margines dolny</string>
<string name="pref_keyboard_height_title">Wysokość klawiatury</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Ciemny</string>
<string name="pref_theme_e_light">Jasny</string>
<string name="pref_theme_e_black">Czarny</string>
<string name="pref_theme_e_altblack">Alternatywny Czarny</string>
<string name="pref_theme_e_white">Biały</string>
<string name="pref_theme_e_epaper">e-paper</string>
<string name="pref_swipe_dist_e_very_short">Bardzo mała</string>
<string name="pref_swipe_dist_e_short">Mała</string>
<string name="pref_swipe_dist_e_default">Normalna</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Wstecz</string>
<string name="key_action_search">Szukaj</string>
<string name="key_action_send">Wyślij</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -21,11 +21,11 @@
<!-- <string name="pref_show_numpad_never">Never</string> -->
<!-- <string name="pref_show_numpad_landscape">Only in landscape mode</string> -->
<!-- <string name="pref_show_numpad_always">Always</string> -->
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<string name="pref_autocapitalisation_title">Maiusculização automática</string>
<string name="pref_autocapitalisation_summary">Aciona o shift no início de cada frase</string>
<!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> -->
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<string name="pref_second_layout_none">Nenhum</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Distância até acionar os cantos das teclas (%s)</string>
<string name="pref_long_timeout_title">Tempo até repetir tecla</string>
<string name="pref_long_interval_title">Intervalo de repetição de tecla</string>
<string name="pref_vibrate_title">Vibração</string>
<string name="pref_vibrate_summary">Ativar/desativar vibração ao digitar</string>
<string name="pref_precise_repeat_title">Precisão nos movimentos do cursor</string>
<string name="pref_precise_repeat_summary">Varia a velocidade de repetição a depender do quanto deslizar</string>
<string name="pref_lock_double_tap_title">Tecle duas vezes no shift para caixa alta</string>
<string name="pref_lock_double_tap_summary">Ao invés de apertar e segurar por um tempo</string>
<!-- <string name="pref_category_behavior">Behavior</string> -->
<string name="pref_autocapitalisation_title">Maiusculização automática</string>
<string name="pref_autocapitalisation_summary">Aciona o shift no início de cada frase</string>
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">Vibração</string>
<string name="pref_vibrate_summary">Ativar/desativar vibração ao digitar</string>
<string name="pref_category_style">Estilo</string>
<string name="pref_margin_bottom_title">Margem inferior</string>
<string name="pref_keyboard_height_title">Altura do teclado</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Escuro</string>
<string name="pref_theme_e_light">Claro</string>
<string name="pref_theme_e_black">Preto</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<!-- <string name="pref_theme_e_white">White</string> -->
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">Muito curto</string>
<string name="pref_swipe_dist_e_short">Curto</string>
<string name="pref_swipe_dist_e_default">Normal</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Anterior</string>
<string name="key_action_search">Buscar</string>
<string name="key_action_send">Enviar</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -3,8 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (отладка)</string>
<!-- <string name="app_name" product="default">Unexpected Keyboard</string> -->
<string name="settings_activity_label">Unexpected Keyboard Настройки</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_portrait">В портретном режиме</string>
<string name="pref_landscape">В ландшафтном режиме</string>
<string name="pref_category_layout">Расположение</string>
<string name="pref_label_brightness">Изменить яркость клавиатуры</string>
<string name="pref_keyboard_opacity">Изменить прозрачность фона</string>
@@ -21,11 +21,11 @@
<string name="pref_show_numpad_never">Никогда</string>
<string name="pref_show_numpad_landscape">Только в ландшафтном режиме</string>
<string name="pref_show_numpad_always">Всегда</string>
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<string name="pref_numpad_layout">NumPad раскладка</string>
<string name="pref_numpad_layout_e_high_first">Старшие цифры сверху</string>
<string name="pref_numpad_layout_e_low_first">Младшие цифры сверху</string>
<string name="pref_autocapitalisation_title">Автоматическая смена регистра</string>
<string name="pref_autocapitalisation_summary">Автонажатие Shift в начале каждого предложения</string>
<string name="pref_extra_keys_title">Добавить клавиши на клавиатуру</string>
<string name="pref_second_layout_title">Дополнительная раскладка</string>
<string name="pref_second_layout_none">Нет</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Расстояние между символами в углах клавиш (%s)</string>
<string name="pref_long_timeout_title">Тайм-аут повтора клавиш</string>
<string name="pref_long_interval_title">Интервал повтора клавиш</string>
<string name="pref_vibrate_title">Вибрация</string>
<string name="pref_vibrate_summary">Включение/выключение вибрации при нажатии клавиши</string>
<string name="pref_precise_repeat_title">Точные перемещения курсора</string>
<string name="pref_precise_repeat_summary">Изменяйте скорость повтора клавиш, проводя пальцем больше или меньше</string>
<string name="pref_lock_double_tap_title">Двойное нажатие на Shift активирует Caps lock</string>
<string name="pref_lock_double_tap_summary">Вы можете активировать модификатор, удерживая клавишу</string>
<!-- <string name="pref_category_behavior">Behavior</string> -->
<string name="pref_autocapitalisation_title">Автоматическая смена регистра</string>
<string name="pref_autocapitalisation_summary">Автонажатие Shift в начале каждого предложения</string>
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">Вибрация</string>
<string name="pref_vibrate_summary">Включение/выключение вибрации при нажатии клавиши</string>
<string name="pref_category_style">Стиль</string>
<string name="pref_margin_bottom_title">Нижняя граница поля</string>
<string name="pref_keyboard_height_title">Высота клавиатуры</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Темная</string>
<string name="pref_theme_e_light">Светлая</string>
<string name="pref_theme_e_black">Черная</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<string name="pref_theme_e_white">Белая</string>
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">Очень близко</string>
<string name="pref_swipe_dist_e_short">Близко</string>
<string name="pref_swipe_dist_e_default">Нормально</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Предыдущий</string>
<string name="key_action_search">Поиск</string>
<string name="key_action_send">Отправить</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -21,11 +21,11 @@
<!-- <string name="pref_show_numpad_never">Never</string> -->
<!-- <string name="pref_show_numpad_landscape">Only in landscape mode</string> -->
<!-- <string name="pref_show_numpad_always">Always</string> -->
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<!-- <string name="pref_autocapitalisation_title">Automatic capitalisation</string> -->
<!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> -->
<!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> -->
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<string name="pref_second_layout_none">Hiçbiri</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Tuşların köşelerindeki karakterlerin uzaklıkları (%s)</string>
<string name="pref_long_timeout_title">Tuş tekrarlama beklemesi</string>
<string name="pref_long_interval_title">Tuş tekrarlama aralığı</string>
<string name="pref_vibrate_title">Titreşim</string>
<string name="pref_vibrate_summary">Tuşa basıldığında titreşimi etkinleştir</string>
<string name="pref_precise_repeat_title">İmleç hareketini ayarla</string>
<string name="pref_precise_repeat_summary">Tuş tekrar hızını az ya da çok kaydırarak ayarla</string>
<!-- <string name="pref_lock_double_tap_title">Double tap on shift for caps lock</string> -->
<!-- <string name="pref_lock_double_tap_summary">You can lock any modifier by holding it</string> -->
<!-- <string name="pref_category_behavior">Behavior</string> -->
<!-- <string name="pref_autocapitalisation_title">Automatic capitalisation</string> -->
<!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> -->
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">Titreşim</string>
<string name="pref_vibrate_summary">Tuşa basıldığında titreşimi etkinleştir</string>
<string name="pref_category_style">Stil</string>
<string name="pref_margin_bottom_title">Alt boşluk</string>
<string name="pref_keyboard_height_title">Klavye yüksekliği</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Koyu</string>
<string name="pref_theme_e_light">ık</string>
<string name="pref_theme_e_black">Siyah</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<!-- <string name="pref_theme_e_white">White</string> -->
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">Çok kısa</string>
<string name="pref_swipe_dist_e_short">Kısa</string>
<string name="pref_swipe_dist_e_default">Normal</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Geri</string>
<string name="key_action_search">Ara</string>
<string name="key_action_send">Gönder</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

82
res/values-vi/strings.xml Normal file
View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" product="debug">Unexpected Keyboard (gỡ lỗi)</string>
<string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Cài đặt Unexpected Keyboard</string>
<string name="pref_portrait">Trong chế độ chân dung</string>
<string name="pref_landscape">Trong chế độ phong cảnh</string>
<string name="pref_category_layout">Bố cục</string>
<string name="pref_label_brightness">Tùy chỉnh độ sáng của phím</string>
<string name="pref_keyboard_opacity">Tùy chỉnh độ trong suốt của bàn phím</string>
<string name="pref_key_opacity">Tùy chỉnh độ trong suốt của phím</string>
<string name="pref_key_activated_opacity">Tùy chỉnh độ trong suốt của phím khi nhấn</string>
<string name="pref_layout_title">Thay đổi bố cục bàn phím</string>
<string name="pref_layout_e_system">Hệ thống</string>
<string name="pref_layout_e_custom">Tùy chỉnh bố cục</string>
<string name="pref_accents_title">Dấu phụ</string>
<string name="pref_accents_e_all_installed">Hiển thị cho các ngôn ngữ đã cài đặt</string>
<string name="pref_accents_e_selected">Chỉ hiển thị cho các ngôn ngữ đã chọn</string>
<string name="pref_accents_e_none">
Ẩn dấu phụ
</string>
<string name="pref_show_numpad_title">Hiện NumPad</string>
<string name="pref_show_numpad_never">Không bao giờ</string>
<string name="pref_show_numpad_landscape">Chỉ trong chế độ phong cảnh</string>
<string name="pref_show_numpad_always">Luôn luôn</string>
<string name="pref_number_row_title">Hiện số dòng</string>
<string name="pref_number_row_summary">Hiện số dòng trên đầu bàn phím khi NumPad ẩn</string>
<string name="pref_numpad_layout">Bố cục NumPad</string>
<string name="pref_numpad_layout_e_high_first">Số lớn nhất trước</string>
<string name="pref_numpad_layout_e_low_first">Số nhỏ nhất trước</string>
<string name="pref_extra_keys_title">Thêm phím vào bàn phím</string>
<string name="pref_second_layout_title">Bố cục phụ</string>
<string name="pref_second_layout_none">Không</string>
<string name="pref_category_typing"></string>
<string name="pref_swipe_dist_title">Khoảng cách vuốt</string>
<string name="pref_swipe_dist_summary">Khoảng cách giữa các ký tự ở góc phím (%s)</string>
<string name="pref_long_timeout_title">Thời hạn lặp phím</string>
<string name="pref_long_interval_title">Khoảng thời gian lặp phím</string>
<string name="pref_lock_double_tap_title">Nhấn hai lần Shift để bật Caps Lock</string>
<string name="pref_lock_double_tap_summary">Bạn có thể khóa phím hỗ trợ bằng cách giữ vào nó</string>
<!-- <string name="pref_category_behavior">Behavior</string> -->
<string name="pref_autocapitalisation_title">Tự động viết hoa</string>
<string name="pref_autocapitalisation_summary">Nhấn Shift ở đầu câu</string>
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">Sự rung</string>
<string name="pref_vibrate_summary">Bật/tắt rung khi nhấn</string>
<string name="pref_category_style">Kiểu cách</string>
<string name="pref_margin_bottom_title">Căn lề dưới</string>
<string name="pref_keyboard_height_title">Chiều cao bàn phím</string>
<string name="pref_horizontal_margin_title">Căn lề chiều ngang</string>
<string name="pref_character_size_title">Kích cỡ ký tự phím</string>
<string name="pref_character_size_summary">Kích cỡ các ký tự hiển thị trên bàn phím (%.2fx)</string>
<string name="pref_theme">Chủ đề</string>
<string name="pref_theme_e_system">Hệ thống</string>
<string name="pref_theme_e_dark">Tối</string>
<string name="pref_theme_e_light">Sáng</string>
<string name="pref_theme_e_black">Đen</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<string name="pref_theme_e_white">Trắng</string>
<string name="pref_theme_e_epaper">ePaper</string>
<string name="pref_swipe_dist_e_very_short">Rất gần</string>
<string name="pref_swipe_dist_e_short">Gần</string>
<string name="pref_swipe_dist_e_default">Trungbình</string>
<string name="pref_swipe_dist_e_far">Xa</string>
<string name="pref_swipe_dist_e_very_far">Rất xa</string>
<string name="pref_key_horizontal_space">Khoảng cách giữa các phím theo chiều ngang</string>
<string name="pref_key_vertical_space">Khoảng cách giữa các phím theo chiều dọc</string>
<string name="pref_category_advanced">Nâng cao</string>
<string name="pref_custom_layout_title">Tùy chỉnh bố cục</string>
<string name="pref_custom_layout_summary">Hãy xem mã nguồn. Lựa chọn này không có mục đích sử dụng.</string>
<string name="key_action_next">Tiếp</string>
<string name="key_action_done">Xong</string>
<string name="key_action_go">Đi</string>
<string name="key_action_prev">Trước</string>
<string name="key_action_search">Tìm</string>
<string name="key_action_send">Gửi</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -21,11 +21,11 @@
<string name="pref_show_numpad_never">从不</string>
<string name="pref_show_numpad_landscape">只在横屏显示</string>
<string name="pref_show_numpad_always">一直显示</string>
<!-- <string name="pref_number_row_title">Show number row</string> -->
<!-- <string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string> -->
<!-- <string name="pref_numpad_layout">NumPad layout</string> -->
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> -->
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> -->
<string name="pref_autocapitalisation_title">句首自动大写</string>
<string name="pref_autocapitalisation_summary">在句子的开头自动按下Shift</string>
<string name="pref_extra_keys_title">选择要显示的按键</string>
<string name="pref_second_layout_title">第二键盘布局</string>
<string name="pref_second_layout_none"></string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">输入按键四角的符号需要滑动的距离 (%s)</string>
<string name="pref_long_timeout_title">长按到开始重复输入的时间</string>
<string name="pref_long_interval_title">长按后每次重复输入的时间间隔</string>
<string name="pref_vibrate_title">振动</string>
<string name="pref_vibrate_summary">启用或者禁用按下按键时振动</string>
<string name="pref_precise_repeat_title">精确控制光标移速</string>
<string name="pref_precise_repeat_summary">按键重复按下速度由手指滑动的距离决定</string>
<string name="pref_lock_double_tap_title">双击Shift键锁定大写</string>
<string name="pref_lock_double_tap_summary">任何时候都可以长按修改键以锁定</string>
<!-- <string name="pref_category_behavior">Behavior</string> -->
<string name="pref_autocapitalisation_title">句首自动大写</string>
<string name="pref_autocapitalisation_summary">在句子的开头自动按下Shift</string>
<!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> -->
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> -->
<string name="pref_vibrate_title">振动</string>
<string name="pref_vibrate_summary">启用或者禁用按下按键时振动</string>
<string name="pref_category_style">样式</string>
<string name="pref_margin_bottom_title">键盘下边距</string>
<string name="pref_keyboard_height_title">键盘高度</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">暗色</string>
<string name="pref_theme_e_light">亮色</string>
<string name="pref_theme_e_black">黑色</string>
<!-- <string name="pref_theme_e_altblack">Alternative Black</string> -->
<string name="pref_theme_e_white">白色</string>
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_swipe_dist_e_very_short">非常短</string>
<string name="pref_swipe_dist_e_short"></string>
<string name="pref_swipe_dist_e_default">中(默认)</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">前一项</string>
<string name="key_action_search">搜索</string>
<string name="key_action_send">发送</string>
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
<!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> -->
</resources>

View File

@@ -14,6 +14,7 @@
<item>qwerty_hu</item>
<item>qwerty_tr</item>
<item>qwerty_pl</item>
<item>qwerty_vi</item>
<item>ru_jcuken</item>
<item>qwertz</item>
<item>qwertz_cs</item>
@@ -27,7 +28,12 @@
<item>bone</item>
<item>jcuken_ua</item>
<item>bangla</item>
<item>hindi</item>
<item>devanagari_1</item>
<item>devanagari_2</item>
<item>he_il_1452_1</item>
<item>he_il_1452_2</item>
<item>ar_pc</item>
<item>ar_alt</item>
<item>custom</item>
</string-array>
<string-array name="pref_layout_entries">
@@ -44,6 +50,7 @@
<item>QWERTY (Hungarian)</item>
<item>QWERTY (Türkçe)</item>
<item>QWERTY (Polski)</item>
<item>QWERTY (Vietnamese)</item>
<item>ЙЦУКЕН (Русский)</item>
<item>QWERTZ</item>
<item>QWERTZ (Czech)</item>
@@ -57,7 +64,12 @@
<item>Bone</item>
<item>ЙЦУКЕН (Українська)</item>
<item>বাংলা</item>
<item>हिन्दी</item>
<item>देवनागरी (हिंदी)-1</item>
<item>देवनागरी (हिंदी)-2</item>
<item>Hebrew SI-1452-1</item>
<item>Hebrew SI-1452-2</item>
<item>Arabic PC</item>
<item>Arabic ALT</item>
<item>@string/pref_layout_e_custom</item>
</string-array>
<string-array name="pref_accents_entries">
@@ -93,14 +105,18 @@
<item>@string/pref_theme_e_dark</item>
<item>@string/pref_theme_e_light</item>
<item>@string/pref_theme_e_black</item>
<item>@string/pref_theme_e_altblack</item>
<item>@string/pref_theme_e_white</item>
<item>@string/pref_theme_e_epaper</item>
</string-array>
<string-array name="pref_theme_values">
<item>system</item>
<item>dark</item>
<item>light</item>
<item>black</item>
<item>altblack</item>
<item>white</item>
<item>epaper</item>
</string-array>
<string-array name="pref_swipe_dist_entries">
<item>@string/pref_swipe_dist_e_very_short</item>

View File

@@ -21,11 +21,11 @@
<string name="pref_show_numpad_never">Never</string>
<string name="pref_show_numpad_landscape">Only in landscape mode</string>
<string name="pref_show_numpad_always">Always</string>
<string name="pref_number_row_title">Show number row</string>
<string name="pref_number_row_summary">Add a number row at the top of the keyboard when the numpad is hidden</string>
<string name="pref_numpad_layout">NumPad layout</string>
<string name="pref_numpad_layout_e_high_first">High digits first</string>
<string name="pref_numpad_layout_e_low_first">Low digits first</string>
<string name="pref_autocapitalisation_title">Automatic capitalisation</string>
<string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string>
<string name="pref_extra_keys_title">Add keys to the keyboard</string>
<string name="pref_second_layout_title">Secondary layout</string>
<string name="pref_second_layout_none">None</string>
@@ -34,12 +34,15 @@
<string name="pref_swipe_dist_summary">Distance of characters in the corners of the keys (%s)</string>
<string name="pref_long_timeout_title">Key repeat timeout</string>
<string name="pref_long_interval_title">Key repeat interval</string>
<string name="pref_vibrate_title">Vibration</string>
<string name="pref_vibrate_summary">Enable/disable vibration on keypress</string>
<string name="pref_precise_repeat_title">Precise cursor movements</string>
<string name="pref_precise_repeat_summary">Modulate key repeat speed by swiping more or less</string>
<string name="pref_lock_double_tap_title">Double tap on shift for caps lock</string>
<string name="pref_lock_double_tap_summary">You can lock any modifier by holding it</string>
<string name="pref_category_behavior">Behavior</string>
<string name="pref_autocapitalisation_title">Automatic capitalisation</string>
<string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string>
<string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string>
<string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string>
<string name="pref_vibrate_title">Vibration</string>
<string name="pref_vibrate_summary">Enable/disable vibration on keypress</string>
<string name="pref_category_style">Style</string>
<string name="pref_margin_bottom_title">Margin bottom</string>
<string name="pref_keyboard_height_title">Keyboard height</string>
@@ -51,7 +54,9 @@
<string name="pref_theme_e_dark">Dark</string>
<string name="pref_theme_e_light">Light</string>
<string name="pref_theme_e_black">Black</string>
<string name="pref_theme_e_altblack">Alternative Black</string>
<string name="pref_theme_e_white">White</string>
<string name="pref_theme_e_epaper">ePaper</string>
<string name="pref_swipe_dist_e_very_short">Very short</string>
<string name="pref_swipe_dist_e_short">Short</string>
<string name="pref_swipe_dist_e_default">Normal</string>
@@ -68,4 +73,8 @@
<string name="key_action_prev">Prev</string>
<string name="key_action_search">Search</string>
<string name="key_action_send">Send</string>
<string name="launcher_button_imesettings">Enable keyboard</string>
<string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string>
<string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string>
<string name="launcher_tryhere">After enabling, you can try the keyboard here:</string>
</resources>

View File

@@ -24,4 +24,11 @@
<item name="android:textSize">@dimen/emoji_text_size</item>
<item name="android:textColor">?attr/emoji_color</item>
</style>
<style name="paragraph">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginVertical">8dp</item>
<item name="android:layout_marginHorizontal">16dp</item>
<item name="android:layout_gravity">center</item>
</style>
</resources>

View File

@@ -96,6 +96,9 @@
<item name="emoji_button_bg">#000000</item>
<item name="emoji_color">#ffffff</item>
</style>
<style name="AltBlack" parent="Black">
<item name="keyBorderWidth">1dp</item>
</style>
<style name="White" parent="BaseTheme">
<item name="android:isLightTheme">true</item>
<item name="colorKeyboard">#ffffff</item>
@@ -115,4 +118,23 @@
<item name="emoji_button_bg">#ffffff</item>
<item name="emoji_color">#000000</item>
</style>
<style name="ePaper" parent="BaseTheme">
<item name="android:isLightTheme">true</item>
<item name="colorKeyboard">#ffffff</item>
<item name="colorKey">#ffffff</item>
<item name="keyBorderWidth">2dp</item>
<item name="keyBorderWidthActivated">5dp</item>
<item name="keyBorderColorLeft">#000000</item>
<item name="keyBorderColorTop">#000000</item>
<item name="keyBorderColorRight">#000000</item>
<item name="keyBorderColorBottom">#000000</item>
<item name="colorKeyActivated">#ffffff</item>
<item name="colorLabel">#000000</item>
<item name="colorLabelActivated">#000000</item>
<item name="colorLabelLocked">#33cc33</item>
<item name="colorSubLabel">#333333</item>
<item name="secondaryLightOffset">+0.35</item>
<item name="emoji_button_bg">#ffffff</item>
<item name="emoji_color">#000000</item>
</style>
</resources>

42
res/xml/ar_alt.xml Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key key0="ض" key2="١" key3="`" key4="esc"/>
<key key0="ص" key2="٢" key3="\@"/>
<key key0="ث" key2="٣" key3="\#"/>
<key key0="ق" key2="٤" key3="$"/>
<key key0="ف" key2="٥" key3="%"/>
<key key0="غ" key2="٦" key3="^"/>
<key key0="ع" key2="٧" key3="&amp;"/>
<key key0="ه" key2="٨" key3="*"/>
<key key0="خ" key2="٩" key3="("/>
<key key0="ح" key2="٠" key3=")"/>
<key key0="ج"/>
</row>
<row>
<key key0="ش" key4="tab"/>
<key key0="س"/>
<key key0="ي"/>
<key key0="ب"/>
<key key0="ل"/>
<key key0="ا" key1="أ"/>
<key key0="ت"/>
<key key0="ن"/>
<key key0="م"/>
<key key0="ك"/>
<key key0="ط"/>
</row>
<row>
<key key0="ذ"/>
<key key0="ء"/>
<key key0="ؤ" key1="{"/>
<key key0="ر" key1="}"/>
<key key0="ى" key1="ئ"/>
<key key0="ة"/>
<key key0="و" key3=","/>
<key key0="ز" key3="."/>
<key key0="ظ" key3="&#1567;"/>
<key key0="د"/>
<key width="1.0" key0="backspace" key2="delete"/>
</row>
</keyboard>

44
res/xml/ar_pc.xml Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key key0="ض" key1="&#1614;" key2="١" key3="`" key4="esc"/>
<key key0="ص" key1="&#1611;" key2="٢" key3="\@"/>
<key key0="ث" key1="&#1615;" key2="٣" key3="\#" key4="loc €"/>
<key key0="ق" key1="&#1612;" key2="٤" key3="$" key4="loc £"/>
<key key0="ف" key1="&#1604;&#1573;" key2="٥" key3="%"/>
<key key0="غ" key1="&#1573;" key2="٦" key3="^"/>
<key key0="ع" key1="&#8216;" key2="٧" key3="&amp;"/>
<key key0="ه" key1="&#0247;" key2="٨" key3="*"/>
<key key0="خ" key1="&#0215;" key2="٩" key3="("/>
<key key0="ح" key1="&#1563;" key2="٠" key3=")"/>
<key key0="ج" key1="&gt;" key2="-" key3="_"/>
<key key0="د" key1="&lt;" key2="=" key3="ذ"/>
<!-- <key key0="ذ" key1="&#1617;" key3="\\" key4="|"/> -->
</row>
<row>
<key shift="0.5" key0="ش" key1="&#1616;" key4="tab"/>
<key key0="س" key1="&#1613;"/>
<key key0="ي" key1="["/>
<key key0="ب" key1="]"/>
<key key0="ل" key1="&#1604;&#1571;"/>
<key key0="ا" key1="أ"/>
<key key0="ت" key1="ـ"/>
<key key0="ن" key1="&#1548;"/>
<key key0="م" key1="/"/>
<key key0="ك" key1=":"/>
<key key0="ط" key1="&quot;"/>
</row>
<row>
<key shift="0.5" key0="ئ" key1="~"/>
<key key0="ء" key1="&#1618;"/>
<key key0="ؤ" key1="{"/>
<key key0="ر" key1="}"/>
<key key0="لا" key1="&#1604;&#1570;"/>
<key key0="ى" key1="&#1570;"/>
<key key0="ة" key1="&#8217;"/>
<key key0="و" key1=","/>
<key key0="ز" key1="."/>
<key key0="ظ" key1="&#1567;"/>
<key width="1.5" key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@@ -38,8 +38,8 @@
<row height="0.95">
<key width="1.8" key0="ctrl" key2="loc meta" key4="switch_numeric"/>
<key width="1.2" key0="fn" key1="loc alt" key2="change_method" key3="switch_emoji" key4="config"/>
<key width="4.0" key0="space" key1="switch_second" key2="0" edgekeys="true"/>
<key width="1.2" key1="up" key2="right" key3="left" key4="down" edgekeys="true"/>
<key width="4.0" key0="space" key7="switch_second" key8="0"/>
<key width="1.2" key7="up" key6="right" key5="left" key8="down"/>
<key width="1.8" key0="enter" key3="action"/>
</row>
</keyboard>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<row height="0.95">
<key width="1.8" key0="ctrl" key1="loc switch_greekmath" key2="loc meta" key4="switch_numeric"/>
<key width="1.2" key0="fn" key1="loc alt" key2="change_method" key3="switch_emoji" key4="config"/>
<key width="4.0" key0="space" key1="switch_second" edgekeys="true"/>
<key width="1.2" key1="up" key2="right" key3="left" key4="down" edgekeys="true"/>
<key width="1.8" key0="enter" key2="action"/>
<key width="1.7" key0="ctrl" key1="loc switch_greekmath" key2="loc meta" key4="switch_numeric"/>
<key width="1.1" key0="fn" key1="loc alt" key2="change_method" key3="switch_emoji" key4="config"/>
<key width="4.4" key0="space" key7="switch_second" key5="left" key6="right" slider="true"/>
<key width="1.1" key7="up" key6="right" key5="left" key8="down"/>
<key width="1.7" key0="enter" key2="action"/>
</row>

30
res/xml/devanagari_2.xml Normal file
View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key shift="0.35" width="0.9" key0="क" key1="ख" key2="घ" key3="ङ" key4="ग"/>
<key width="0.9" key0="च" key1="छ" key2="झ" key3="ञ" key4="ज"/>
<key width="0.9" key0="ट" key1="ठ" key2="ढ" key3="ण" key4="ड"/>
<key width="0.9" key0="त" key1="थ" key2="ध" key3="न" key4="द"/>
<key width="0.9" key0="प" key1="फ" key2="भ" key3="म" key4="ब"/>
<key width="0.9" key0="र" key1="ज्ञ" key2="ल" key3="य" key4="व"/>
<key width="0.9" key0="ह" key1="श" key2="ळ" key3="स" key4="ष"/>
</row>
<row>
<key shift="0.35" width="0.9" key0="ा" key1="अ" key2="आ"/>
<key width="0.9" key0="ि" key1="इ"/>
<key width="0.9" key0="ी" key1="ई"/>
<key width="0.9" key0="ु" key1="उ" key2="ऊ" key4="ू"/>
<key width="0.9" key0="े" key1="ए" key2="ऋ" key4="ृ"/>
<key width="0.9" key0="ै" key1="ऐ" key2="ऌ" key4="ॢ"/>
<key width="0.9" key0="ो" key1="ओ" key2="औ" key4="ौ"/>
</row>
<row>
<key key0="्" key2="tab" key4="esc"/>
<key key0="ँ" key1="₹" key2="॑" key3="ॖ" key4="॓"/>
<key key0="ं" key1="ॐ" key2="ऽ" key3="" key4="&quot;"/>
<key key0="।" key1="," key2=";" key3="!" key4="\?"/>
<key key0="़" key1="॰" key2="" key3="-" key4="॒"/>
<key key0="५" key1="१" key2="३" key3="७" key4="९" key5="४" key6="६" key7="२" key8="८"/>
<key key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard bottom_row="false" extra_keys="false">
<keyboard bottom_row="false">
<row>
<key key0="θ" key2="^"/>
<key key0="δ" key1="⌊" key2="" key3="↔" key4="⊂"/>
@@ -41,7 +41,7 @@
<key width="1.2" key0="fn"/>
<key width="2.8" key0="space" key1="superscript" key3="subscript"/>
<key width="1.2" key0="0" key2="."/>
<key width="1.2" key1="up" key2="right" key3="left" key4="down" edgekeys="true"/>
<key width="1.2" key7="up" key6="right" key5="left" key8="down"/>
<key width="1.2" key0="enter" key1="=" key2="action"/>
</row>
</keyboard>

41
res/xml/he_il_1452_1.xml Normal file
View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key key0="/" key2="1" key3="!" key4="esc"/>
<key key0="'" key2="2" key3="\@" key1=";"/>
<key key0="ק" key2="3" key3="\#" key1="€"/>
<key key0="ר" key2="4" key3="$" key1="₪"/>
<key key0="א" key2="5" key3="%"/>
<key key0="ט" key2="6" key3="^" key4="ole_placeholder"/>
<key key0="ו" key2="7" key3="&amp;" key4="meteg_placeholder"/>
<key key0="ן" key2="8" key3="*"/>
<key key0="ם" key2="9" key3="b(" key4="lrm"/>
<key key0="פ" key2="0" key3="b)" key4="rlm"/>
<key key0="backspace" key2="delete" key3="f11_placeholder" key4="f12_placeholder"/>
</row>
<row>
<key key0="ש" key2="`" key1="tab" key3="sindot_placeholder" key4="shindot_placeholder" width="1.333"/>
<key key0="ד" key1="~" width="1.0333"/>
<key key0="ג" key1="geresh" key2="gershayim" width="1.0333"/>
<key key0="כ" width="1.0333"/>
<key key0="ע" width="1.0333"/>
<key key0="י" key2="-" key3="_" key4="maqaf" width="1.0333"/>
<key key0="ח" key2="=" key3="+" width="1.0333"/>
<key key0="ל" key2="b[" key3="b{" width="1.0333"/>
<key key0="ך" key2="b]" key3="b}" width="1.0333"/>
<key key0="ף" key2="," key3="&quot;" key1=":" width="1.4006"/>
</row>
<row>
<key key0="\\" key1="|" key2="shift" key3="loc capslock"/>
<key key0="ז"/>
<key key0="ס"/>
<key key0="ב"/>
<key key0="ה"/>
<key key0="נ"/>
<key key0="מ"/>
<key key0="צ"/>
<key key0="ת" key1="blt"/>
<key key0="ץ" key1="bgt"/>
<key key0="." key1="\?"/>
</row>
</keyboard>

39
res/xml/he_il_1452_2.xml Normal file
View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key key0="ץ" key2="1" key3="!" key4="esc"/>
<key key0="ן" key2="2" key3="\@" key1=";"/>
<key key0="ק" key2="3" key3="\#" key1="€"/>
<key key0="ר" key2="4" key3="$" key1="₪"/>
<key key0="א" key2="5" key3="%"/>
<key key0="ט" key2="6" key3="^" key4="ole_placeholder"/>
<key key0="ו" key2="7" key3="&amp;" key4="meteg_placeholder"/>
<key key0="ת" key2="8" key3="*"/>
<key key0="ם" key2="9" key3="b(" key4="lrm"/>
<key key0="פ" key2="0" key3="b)" key4="rlm" width="1.333"/>
</row>
<row>
<key key0="ש" key2="`" key1="tab" key3="sindot_placeholder" key4="shindot_placeholder" width="1.333"/>
<key key0="ד" key1="~"/>
<key key0="ג" key1="geresh" key2="gershayim"/>
<key key0="כ"/>
<key key0="ע"/>
<key key0="י" key2="-" key3="_" key4="maqaf"/>
<key key0="ח" key2="=" key3="+"/>
<key key0="ל" key2="b[" key3="b{"/>
<key key0="ך" key2="b]" key3="b}"/>
<key key0="ף" key2="'" key3="&quot;" key1=":"/>
</row>
<row>
<key key0="\\" key1="|" key2="shift" key3="loc capslock"/>
<key key0="ז"/>
<key key0="ס"/>
<key key0="ב"/>
<key key0="ה" />
<key key0="נ"/>
<key key0="מ" key1="blt" key2=","/>
<key key0="צ" key1="bgt" key2="."/>
<key key0="/" key1="\?"/>
<key key0="backspace" key2="delete" key3="f11_placeholder" key4="f12_placeholder" width="1.333"/>
</row>
</keyboard>

View File

@@ -2,17 +2,16 @@
<keyboard>
<row>
<key key0="й" key2="1" key4="esc"/>
<key key0="ц" key2="2" key3="\@" key4="~"/>
<key key0="у" key2="3" key3="\#" key4="!"/>
<key key0="ц" key1="loc ї" key2="2" key3="\@" key4="~"/>
<key key0="у" key1="loc ў" key2="3" key3="\#" key4="!"/>
<key key0="к" key2="4" key3="$"/>
<key key0="е" key1="ё" key2="5" key3="%"/>
<key key0="н" key2="6" key3="^"/>
<key key0="г" key2="7" key3="&amp;"/>
<key key0="н" key1="loc є" key2="6" key3="^"/>
<key key0="г" key1="loc ґ" key2="7" key3="&amp;"/>
<key key0="ш" key2="8" key3="*"/>
<key key0="щ" key2="9" key3="(" key4=")"/>
<key key0="з" key2="0" key3="{" key4="}" />
<key key0="з" key2="0" key3="{" key4="}"/>
<key key0="х" key3="[" key4="]" key1="f11_placeholder" key2="f12_placeholder"/>
</row>
<row>
<key key0="ф" key1="tab" key2="`"/>
@@ -33,7 +32,7 @@
<key width="0.96" key0="ч"/>
<key width="0.96" key0="с"/>
<key width="0.96" key0="м"/>
<key width="0.96" key0="и" key2="&lt;" key3="."/>
<key width="0.96" key0="и" key1="loc і" key2="&lt;" key3="."/>
<key width="0.96" key0="т" key2="&gt;" key3=","/>
<key width="0.96" key0="ь" key1="ъ" key2="\?" key3="/"/>
<key width="0.96" key0="б" key2=":" key3=";"/>

View File

@@ -1,13 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<input-method xmlns:android="http://schemas.android.com/apk/res/android" android:settingsActivity="juloo.keyboard2.SettingsActivity" android:supportsSwitchingToNextInputMethod="true">
<subtype android:label="%s" android:languageTag="ar" android:imeSubtypeLocale="ar" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=ar_pc"/>
<subtype android:label="%s" android:languageTag="be" android:imeSubtypeLocale="be_BY" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=ru_jcuken,extra_keys=ґ|є|і|ї|ў"/>
<subtype android:label="%s" android:languageTag="bg" android:imeSubtypeLocale="bg_BG" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=bgph1,extra_keys=€"/>
<subtype android:label="%s" android:languageTag="bn" android:imeSubtypeLocale="bn_BD" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty,extra_keys=৳"/>
<subtype android:label="%s" android:languageTag="hi" android:imeSubtypeLocale="hi_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=hindi,extra_keys="/>
<subtype android:label="%s" android:languageTag="cs" android:imeSubtypeLocale="cs_CZ" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_cs,extra_keys=a|accent_cedille|accent_circonflexe"/>
<subtype android:label="%s" android:languageTag="de" android:imeSubtypeLocale="de_DE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_de,extra_keys=accent_trema|ß|€"/>
<subtype android:label="%s" android:languageTag="el" android:imeSubtypeLocale="el" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_el,extra_keys=£|€"/>
<subtype android:label="%s" android:languageTag="en-GB" android:imeSubtypeLocale="en_GB" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty,extra_keys=£|€"/>
<subtype android:label="%s" android:languageTag="en-US" android:imeSubtypeLocale="en_US" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty"/>
<subtype android:label="%s" android:languageTag="es" android:imeSubtypeLocale="es_ES" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_es,extra_keys=accent_grave|accent_aigu|accent_tilde|accent_trema|€"/>
<subtype android:label="%s" android:languageTag="fr" android:imeSubtypeLocale="fr_FR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=azerty,extra_keys=accent_grave|accent_aigu|accent_circonflexe|accent_cedille|accent_trema|€"/>
<subtype android:label="%s" android:languageTag="he" android:imeSubtypeLocale="he_IL" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=he_il_1452_1,extra_keys=₪|€"/>
<subtype android:label="%s" android:languageTag="hi" android:imeSubtypeLocale="hi_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=devanagari_1,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="mr" android:imeSubtypeLocale="mr_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=devanagari_1,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="ne" android:imeSubtypeLocale="ne_NE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=devanagari_1,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="hu" android:imeSubtypeLocale="hu_HU" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_hu,extra_keys=accent_aigu|accent_trema|accent_ogonek|€"/>
<subtype android:label="%s" android:languageTag="it" android:imeSubtypeLocale="it_IT" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty,extra_keys=accent_grave|accent_aigu|€"/>
<subtype android:label="%s" android:languageTag="ko" android:imeSubtypeLocale="ko_KR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_ko"/>
@@ -18,10 +25,9 @@
<subtype android:label="%s" android:languageTag="pl" android:imeSubtypeLocale="pl_PL" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_pl"/>
<subtype android:label="%s" android:languageTag="pt" android:imeSubtypeLocale="pt_BR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_pt,extra_keys=accent_aigu|accent_cedille|accent_circonflexe|accent_grave|accent_tilde|€"/>
<subtype android:label="%s" android:languageTag="ru" android:imeSubtypeLocale="ru_RU" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=ru_jcuken"/>
<subtype android:label="%s" android:languageTag="sk" android:imeSubtypeLocale="sk_SK" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_sk,extra_keys=é|ě|ŕ|ř|ť|ž|ü|ú|ů|í|ö|ó|ô|á|ä|ś|š|ď|ĺ|ľ|ý|č|ň"/>
<subtype android:label="%s" android:languageTag="sv" android:imeSubtypeLocale="sv_SE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_sv_se,extra_keys=accent_aigu|accent_trema|accent_ring|€"/>
<subtype android:label="%s" android:languageTag="tr" android:imeSubtypeLocale="tr_TR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_tr,extra_keys=accent_cedille|accent_trema|₺|ı|ğ"/>
<subtype android:label="%s" android:languageTag="uk" android:imeSubtypeLocale="uk_UA" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=jcuken_ua"/>
<subtype android:label="%s" android:languageTag="cs" android:imeSubtypeLocale="cs_CZ" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_cs,extra_keys=a|accent_cedille|accent_circonflexe"/>
<subtype android:label="%s" android:languageTag="el" android:imeSubtypeLocale="el" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_el,extra_keys=£|€"/>
<subtype android:label="%s" android:languageTag="sk" android:imeSubtypeLocale="sk_SK" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_sk,extra_keys=é|ě|ŕ|ř|ť|ž|ü|ú|ů|í|ö|ó|ô|á|ä|ś|š|ď|ĺ|ľ|ý|č|ň"/>
<subtype android:label="%s" android:languageTag="uk" android:imeSubtypeLocale="uk_UA" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=jcuken_ua,extra_keys=ґ|є|і"/>
<subtype android:label="%s" android:languageTag="vi" android:imeSubtypeLocale="vi_VN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_vi"/>
</input-method>

View File

@@ -41,8 +41,8 @@
<row height="0.95">
<key width="1.8" key0="ctrl" key2="loc meta" key4="switch_numeric"/>
<key width="1.2" key0="fn" key1="loc alt" key2="change_method" key3="switch_emoji" key4="config"/>
<key width="4.0" key0="space" key1="switch_second" edgekeys="true"/>
<key width="1.2" key1="up" key2="right" key3="left" key4="down" edgekeys="true"/>
<key width="4.0" key0="space" key7="switch_second"/>
<key width="1.2" key7="up" key6="right" key5="left" key8="down"/>
<key key0="j" key4=";"/>
<key width="1.8" key0="enter" key2="action"/>
</row>

13
res/xml/number_row.xml Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<row height="0.75">
<key key0="1"/>
<key key0="2"/>
<key key0="3"/>
<key key0="4"/>
<key key0="5"/>
<key key0="6"/>
<key key0="7"/>
<key key0="8"/>
<key key0="9"/>
<key key0="0"/>
</row>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard bottom_row="false" extra_keys="false" num_pad="false">
<keyboard bottom_row="false">
<row>
<key width="0.75" key0="esc" key2="~" key4="!"/>
<key width="0.75" key0="(" key2="[" key4="{"/>
@@ -13,7 +13,7 @@
<key width="0.75" key0="tab" key2="|" key4="\\"/>
<key width="0.75" key0=")" key2="]" key4="}"/>
<key key0="4" key1="box" key3="arrows"/>
<key key0="5" key1="up" key2="right" key3="left" key4="down" edgekeys="true"/>
<key key0="5" key7="up" key6="right" key5="left" key8="down"/>
<key key0="6"/>
<key width="0.75" key0="+" key1="Σ" key2="$"/>
<key width="0.75" key0="-" key1="^"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard width="6.0" bottom_row="false" extra_keys="false" num_pad="false">
<keyboard width="6.0" bottom_row="false">
<row>
<key shift="1.0" key0="1"/>
<key key0="2" indication="ABC"/>
@@ -21,7 +21,7 @@
<row>
<key shift="1.0" key0="*" key1="switch_text" key3="switch_numeric"/>
<key key0="0" key3="+" key4="space"/>
<key key0="\#" key1="up" key2="right" key3="left" key4="down" edgekeys="true"/>
<key key0="\#" key7="up" key6="right" key5="left" key8="down"/>
<key key0="enter" key2="action"/>
</row>
</keyboard>

View File

@@ -1,10 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file defines the QWERTY layout.
A layout is made of keys arranged into rows. Keys can be made bigger with the
'width' attribute and blank space can be added on the left of a key with the
'shift' attribute.
'key0' assigns the symbol on the middle of the key. 'key1', 'key2', etc..
assign symbols to the corners of a key, they are arranged like this:
1 7 2
5 0 6
3 8 4
Keys prefixed with 'loc ' are not visible on the keyboard. They are used to
specify a place for a key, if it needed to be added to the layout later.
(for example, by the "Add keys to keyboard" option)
See bottom_row.xml for the definition of the bottom row and neo2.xml for a
layout that re-defines it.
See srcs/juloo.keyboard2/KeyValue.java for the keys that have a special meaning.
-->
<keyboard>
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@"/>
<key key0="e" key1="!" key2="3" key3="\#" key4="loc €"/>
<key key0="r" key2="4" key3="$"/>
<key key0="r" key2="4" key3="$" key1="loc ₪"/>
<key key0="t" key2="5" key3="%"/>
<key key0="y" key2="6" key3="^"/>
<key key0="u" key2="7" key3="&amp;"/>

37
res/xml/qwerty_vi.xml Normal file
View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key key0="q" key1="~" key2="1" key3="`" key4="esc"/>
<key key0="w" key1="accent_horn" key2="2" key3="\@"/>
<key key0="e" key1="!" key2="3" key3="\#" key4="ê"/>
<key key0="r" key2="4" key3="$" key1="accent_hook_above"/>
<key key0="t" key2="5" key3="%"/>
<key key0="y" key2="6" key3="^"/>
<key key0="u" key2="7" key3="&amp;"/>
<key key0="i" key2="8" key3="*"/>
<key key0="o" key1="ô" key2="9" key3="(" key4=")"/>
<key key0="p" key2="0" key3="f11_placeholder" key4="f12_placeholder"/>
</row>
<row>
<key shift="0.5" key0="a" key1="tab" key2="ă" key3="â"/>
<key key0="s" key1="accent_aigu"/>
<key key0="d" key1="accent_bar" key2="₫" key3="đ"/>
<key key0="f" key1="accent_grave"/>
<key key0="g" key2="-" key3="_"/>
<key key0="h" key2="=" key3="+"/>
<key key0="j" key1="accent_dot_below" key3="{" key4="}"/>
<key key0="k" key3="[" key4="]"/>
<key key0="l" key2="|" key3="\"/>
</row>
<row>
<key width="1.5" key0="shift" key2="loc capslock"/>
<key key0="z"/>
<key key0="x" key1="accent_tilde"/>
<key key0="c" key2="&lt;" key3="."/>
<key key0="v" key2="&gt;" key3=","/>
<key key0="b" key2="\?" key3="/"/>
<key key0="n" key2=":" key3=";"/>
<key key0="m" key2="&quot;" key3="'"/>
<key width="1.5" key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@@ -5,6 +5,7 @@
<juloo.keyboard2.LayoutListPreference android:key="second_layout" android:title="@string/pref_second_layout_title" app:defaultString="@string/pref_second_layout_none"/>
<ListPreference android:key="accents" android:title="@string/pref_accents_title" android:summary="%s" android:defaultValue="1" android:entries="@array/pref_accents_entries" android:entryValues="@array/pref_accents_values"/>
<ListPreference android:key="show_numpad" android:title="@string/pref_show_numpad_title" android:summary="%s" android:defaultValue="1" android:entries="@array/pref_show_numpad_entries" android:entryValues="@array/pref_show_numpad_values"/>
<CheckBoxPreference android:key="number_row" android:title="@string/pref_number_row_title" android:summary="@string/pref_number_row_summary" android:defaultValue="false"/>
<PreferenceScreen android:title="@string/pref_extra_keys_title">
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="0"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="1"/>
@@ -39,24 +40,29 @@
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="30"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="31"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="32"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="33"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="34"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="35"/>
</PreferenceScreen>
<ListPreference android:key="numpad_layout" android:title="@string/pref_numpad_layout" android:summary="%s" android:defaultValue="high_first" android:entries="@array/pref_numpad_layout_entries" android:entryValues="@array/pref_numpad_layout_values"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_typing">
<CheckBoxPreference android:key="autocapitalisation" android:title="@string/pref_autocapitalisation_title" android:summary="@string/pref_autocapitalisation_summary" android:defaultValue="true"/>
<ListPreference android:key="swipe_dist" android:title="@string/pref_swipe_dist_title" android:summary="@string/pref_swipe_dist_summary" android:defaultValue="15" android:entries="@array/pref_swipe_dist_entries" android:entryValues="@array/pref_swipe_dist_values"/>
<juloo.common.IntSlideBarPreference android:key="longpress_timeout" android:title="@string/pref_long_timeout_title" android:summary="%sms" android:defaultValue="600" min="50" max="2000"/>
<juloo.common.IntSlideBarPreference android:key="longpress_interval" android:title="@string/pref_long_interval_title" android:summary="%sms" android:defaultValue="25" min="5" max="100"/>
<CheckBoxPreference android:key="precise_repeat" android:title="@string/pref_precise_repeat_title" android:summary="@string/pref_precise_repeat_summary" android:defaultValue="true"/>
<CheckBoxPreference android:key="lock_double_tap" android:title="@string/pref_lock_double_tap_title" android:summary="@string/pref_lock_double_tap_summary" android:defaultValue="false"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_behavior">
<CheckBoxPreference android:key="autocapitalisation" android:title="@string/pref_autocapitalisation_title" android:summary="@string/pref_autocapitalisation_summary" android:defaultValue="true"/>
<CheckBoxPreference android:key="switch_input_immediate" android:title="@string/pref_switch_input_immediate_title" android:summary="@string/pref_switch_input_immediate_summary" android:defaultValue="false"/>
<CheckBoxPreference android:key="vibrate_enabled" android:title="@string/pref_vibrate_title" android:summary="@string/pref_vibrate_summary" android:defaultValue="true"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_style">
<ListPreference android:key="theme" android:title="@string/pref_theme" android:summary="%s" android:defaultValue="system" android:entries="@array/pref_theme_entries" android:entryValues="@array/pref_theme_values"/>
<juloo.common.IntSlideBarPreference android:key="label_brightness" android:title="@string/pref_label_brightness" android:summary="%s%%" android:defaultValue="100" min="50" max="100"/>
<juloo.common.IntSlideBarPreference android:key="keyboard_opacity" android:title="@string/pref_keyboard_opacity" android:summary="%s%%" android:defaultValue="100" min="30" max="100"/>
<juloo.common.IntSlideBarPreference android:key="key_opacity" android:title="@string/pref_key_opacity" android:summary="%s%%" android:defaultValue="100" min="30" max="100"/>
<juloo.common.IntSlideBarPreference android:key="key_activated_opacity" android:title="@string/pref_key_activated_opacity" android:summary="%s%%" android:defaultValue="100" min="30" max="100"/>
<juloo.common.IntSlideBarPreference android:key="keyboard_opacity" android:title="@string/pref_keyboard_opacity" android:summary="%s%%" android:defaultValue="100" min="0" max="100"/>
<juloo.common.IntSlideBarPreference android:key="key_opacity" android:title="@string/pref_key_opacity" android:summary="%s%%" android:defaultValue="100" min="0" max="100"/>
<juloo.common.IntSlideBarPreference android:key="key_activated_opacity" android:title="@string/pref_key_activated_opacity" android:summary="%s%%" android:defaultValue="100" min="0" max="100"/>
<PreferenceScreen android:title="@string/pref_margin_bottom_title">
<juloo.common.IntSlideBarPreference android:key="margin_bottom_portrait" android:title="@string/pref_portrait" android:summary="%sdp" android:defaultValue="7" min="0" max="100"/>
<juloo.common.IntSlideBarPreference android:key="margin_bottom_landscape" android:title="@string/pref_landscape" android:summary="%sdp" android:defaultValue="3" min="0" max="100"/>

View File

@@ -28,7 +28,9 @@ final class Config
public boolean show_numpad = false;
// From the 'numpad_layout' option, also apply to the numeric pane.
public boolean inverse_numpad = false;
public boolean number_row;
public float swipe_dist_px;
public float slide_step_px;
public boolean vibrateEnabled;
public long longPressTimeout;
public long longPressInterval;
@@ -41,12 +43,12 @@ final class Config
public int keyboardOpacity; // 0 - 255
public int keyOpacity; // 0 - 255
public int keyActivatedOpacity; // 0 - 255
public boolean preciseRepeat;
public boolean double_tap_lock_shift;
public float characterSize; // Ratio
public int accents; // Values are R.values.pref_accents_v_*
public int theme; // Values are R.style.*
public boolean autocapitalisation;
public boolean switch_input_immediate;
// Dynamically set
public boolean shouldOfferSwitchingToNextInputMethod;
@@ -111,6 +113,7 @@ final class Config
second_layout = tweak_secondary_layout(layout_of_string(res, _prefs.getString("second_layout", "none")));
custom_layout = KeyboardData.load_string(_prefs.getString("custom_layout", ""));
inverse_numpad = _prefs.getString("numpad_layout", "default").equals("low_first");
number_row = _prefs.getBoolean("number_row", false);
// The baseline for the swipe distance correspond to approximately the
// width of a key in portrait mode, as most layouts have 10 columns.
// Multipled by the DPI ratio because most swipes are made in the diagonals.
@@ -119,6 +122,7 @@ final class Config
float swipe_scaling = Math.min(dm.widthPixels, dm.heightPixels) / 10.f * dpi_ratio;
float swipe_dist_value = Float.valueOf(_prefs.getString("swipe_dist", "15"));
swipe_dist_px = swipe_dist_value / 25.f * swipe_scaling;
slide_step_px = swipe_dist_px / 4.f;
vibrateEnabled = _prefs.getBoolean("vibrate_enabled", true);
longPressTimeout = _prefs.getInt("longpress_timeout", 600);
longPressInterval = _prefs.getInt("longpress_interval", 65);
@@ -142,7 +146,6 @@ final class Config
horizontal_margin =
get_dip_pref(dm, oriented_pref("horizontal_margin"),
res.getDimension(R.dimen.horizontal_margin));
preciseRepeat = _prefs.getBoolean("precise_repeat", true);
double_tap_lock_shift = _prefs.getBoolean("lock_double_tap", false);
characterSize =
_prefs.getFloat("character_size", 1.f)
@@ -150,48 +153,38 @@ final class Config
accents = Integer.valueOf(_prefs.getString("accents", "1"));
theme = getThemeId(res, _prefs.getString("theme", ""));
autocapitalisation = _prefs.getBoolean("autocapitalisation", true);
switch_input_immediate = _prefs.getBoolean("switch_input_immediate", false);
extra_keys_param = ExtraKeyCheckBoxPreference.get_extra_keys(_prefs);
}
KeyValue action_key()
{
// Update the name to avoid caching in KeyModifier
return (actionLabel == null) ? null :
KeyValue.getKeyByName("action").withSymbol(actionLabel);
}
/** Update the layout according to the configuration.
* - Remove the switching key if it isn't needed
* - Remove "localized" keys from other locales (not in 'extra_keys')
* - Replace the action key to show the right label
* - Swap the enter and action keys
* - Add the optional numpad and number row
*/
public KeyboardData modify_layout(KeyboardData kw)
{
// Update the name to avoid caching in KeyModifier
final KeyValue action_key = (actionLabel == null) ? null :
KeyValue.getKeyByName("action").withSymbol(actionLabel);
final KeyValue action_key = action_key();
// Extra keys are removed from the set as they are encountered during the
// first iteration then automatically added.
final Set<KeyValue> extra_keys = new HashSet<KeyValue>();
final Set<KeyValue> remove_keys = new HashSet<KeyValue>();
if (extra_keys_subtype != null)
extra_keys.addAll(extra_keys_subtype);
extra_keys.addAll(extra_keys_param);
if (kw.num_pad && show_numpad)
kw = kw.addNumPad();
boolean number_row = this.number_row && !show_numpad;
if (number_row)
KeyboardData.number_row.getKeys(remove_keys);
kw = kw.mapKeys(new KeyboardData.MapKeyValues() {
/** Apply to the center value only. Partial match, fallback to [apply]. */
public KeyboardData.Corner apply_key0(KeyboardData.Corner corner)
{
if (corner == null)
return null;
KeyValue kv = corner.kv;
switch (kv.getKind())
{
case Char:
char c = kv.getChar();
if (inverse_numpad)
c = inverse_numpad_char(c);
if (c != kv.getChar())
return KeyboardData.Corner.of_kv(kv.withChar(c));
break;
}
return super.apply(corner);
}
public KeyValue apply(KeyValue key, boolean localized)
{
boolean is_extra_key = extra_keys.contains(key);
@@ -199,13 +192,19 @@ final class Config
extra_keys.remove(key);
if (localized && !is_extra_key)
return null;
if (remove_keys.contains(key))
return null;
switch (key.getKind())
{
case Event:
switch (key.getEvent())
{
case CHANGE_METHOD:
return shouldOfferSwitchingToNextInputMethod ? key : null;
if (!shouldOfferSwitchingToNextInputMethod)
return null;
if (switch_input_immediate)
return KeyValue.getKeyByName("change_method_prev");
return key;
case ACTION:
return (swapEnterActionKey && action_key != null) ?
KeyValue.getKeyByName("enter") : action_key;
@@ -232,11 +231,54 @@ final class Config
return key;
}
});
if (show_numpad)
kw = kw.addNumPad();
if (number_row)
kw = kw.addNumberRow();
if (extra_keys.size() > 0)
kw = kw.addExtraKeys(extra_keys.iterator());
return kw;
}
/**
* Handle the numpad layout.
*/
public KeyboardData modify_numpad(KeyboardData kw)
{
final KeyValue action_key = action_key();
return kw.mapKeys(new KeyboardData.MapKeyValues() {
public KeyValue apply(KeyValue key, boolean localized)
{
switch (key.getKind())
{
case Event:
switch (key.getEvent())
{
case ACTION:
return (swapEnterActionKey && action_key != null) ?
KeyValue.getKeyByName("enter") : action_key;
}
break;
case Keyevent:
switch (key.getKeyevent())
{
case KeyEvent.KEYCODE_ENTER:
return (swapEnterActionKey && action_key != null) ? action_key : key;
}
break;
case Char:
char a = key.getChar(), b = a;
if (inverse_numpad)
b = inverse_numpad_char(a);
if (a != b)
return key.withChar(b);
break;
}
return key;
}
});
}
/** Modify a layout to turn it into a secondary layout by changing the
"switch_second" key. */
KeyboardData tweak_secondary_layout(KeyboardData layout)
@@ -277,8 +319,10 @@ final class Config
{
case "light": return R.style.Light;
case "black": return R.style.Black;
case "altblack": return R.style.AltBlack;
case "dark": return R.style.Dark;
case "white": return R.style.White;
case "epaper": return R.style.ePaper;
default:
case "system":
if (Build.VERSION.SDK_INT >= 8)
@@ -304,7 +348,8 @@ final class Config
case "bone": id = R.xml.bone; break;
case "colemak": id = R.xml.colemak; break;
case "dvorak": id = R.xml.dvorak; break;
case "hindi": id = R.xml.hindi; break;
case "devanagari_1": id = R.xml.devanagari_1; break;
case "devanagari_2": id = R.xml.devanagari_2; break;
case "jcuken_ua": id = R.xml.jcuken_ua; break;
case "neo2": id = R.xml.neo2; break;
case "qwerty": id = R.xml.qwerty; break;
@@ -318,12 +363,17 @@ final class Config
case "qwerty_sv_se": id = R.xml.qwerty_sv_se; break;
case "qwerty_tr": id = R.xml.qwerty_tr; break;
case "qwerty_pl": id = R.xml.qwerty_pl; break;
case "qwerty_vi": id = R.xml.qwerty_vi; break;
case "qwertz": id = R.xml.qwertz; break;
case "qwertz_cs": id = R.xml.qwertz_cs; break;
case "qwertz_de": id = R.xml.qwertz_de; break;
case "qwertz_hu": id = R.xml.qwertz_hu; break;
case "qwertz_sk": id = R.xml.qwertz_sk; break;
case "ru_jcuken": id = R.xml.local_ru_jcuken; break;
case "he_il_1452_1": id = R.xml.he_il_1452_1; break;
case "he_il_1452_2": id = R.xml.he_il_1452_2; break;
case "ar_pc": id = R.xml.ar_pc; break;
case "ar_alt": id = R.xml.ar_alt; break;
}
return KeyboardData.load(res, id);
}

View File

@@ -31,6 +31,9 @@ public class ExtraKeyCheckBoxPreference extends CheckBoxPreference
"accent_breve",
"accent_slash",
"accent_bar",
"accent_dot_below",
"accent_hook_above",
"accent_horn",
"",
"ß",
"£",

View File

@@ -44,19 +44,20 @@ class KeyEventHandler implements Config.IKeyEventHandler
switch (key.getEvent())
{
case CONFIG: _recv.showKeyboardConfig(); break;
case SWITCH_TEXT: _recv.switch_text(); break;
case SWITCH_NUMERIC: _recv.switch_layout(R.xml.numeric); break;
case SWITCH_TEXT: _recv.set_layout(Layout.Current); break;
case SWITCH_NUMERIC: _recv.set_layout(Layout.Numeric); break;
case SWITCH_EMOJI: _recv.setPane_emoji(); break;
case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break;
case CHANGE_METHOD: _recv.switchToNextInputMethod(); break;
case CHANGE_METHOD: _recv.switchInputMethod(); break;
case CHANGE_METHOD_PREV: _recv.switchToPrevInputMethod(); break;
case ACTION:
InputConnection conn = _recv.getCurrentInputConnection();
if (conn != null)
conn.performEditorAction(actionId);
break;
case SWITCH_SECOND: _recv.switch_second(); break;
case SWITCH_SECOND_BACK: _recv.switch_primary(); break;
case SWITCH_GREEKMATH: _recv.switch_layout(R.xml.greekmath); break;
case SWITCH_SECOND: _recv.set_layout(Layout.Secondary); break;
case SWITCH_SECOND_BACK: _recv.set_layout(Layout.Primary); break;
case SWITCH_GREEKMATH: _recv.set_layout(Layout.Greekmath); break;
case CAPS_LOCK: _recv.set_shift_state(true, true); break;
}
break;
@@ -168,20 +169,24 @@ class KeyEventHandler implements Config.IKeyEventHandler
conn.performContextMenuAction(id);
}
public enum Layout
{
Current, // The primary or secondary layout
Primary,
Secondary,
Numeric,
Greekmath
}
public static interface IReceiver
{
public void switchToNextInputMethod();
public void switchInputMethod();
public void switchToPrevInputMethod();
public void setPane_emoji();
public void setPane_normal();
public void showKeyboardConfig();
public void switch_text();
public void switch_primary();
public void switch_second();
public void switch_layout(int layout_id);
public void set_layout(Layout l);
public void set_shift_state(boolean state, boolean lock);
public InputConnection getCurrentInputConnection();
}

View File

@@ -60,10 +60,29 @@ class KeyModifier
case SLASH: return apply_map_char(k, map_char_slash);
case BAR: return apply_map_char(k, map_char_bar);
case ARROW_RIGHT: return apply_combining(k, "\u20D7");
case DOT_BELOW: return apply_map_char(k, map_char_dot_below);
case HORN: return apply_map_char(k, map_char_horn);
case HOOK_ABOVE: return apply_map_char(k, map_char_hook_above);
default: return k;
}
}
/** Modify a key after a long press. */
public static KeyValue modify_long_press(KeyValue k)
{
switch (k.getKind())
{
case Event:
switch (k.getEvent())
{
case CHANGE_METHOD_PREV:
return KeyValue.getKeyByName("change_method");
}
break;
}
return k;
}
private static KeyValue apply_map_char(KeyValue k, Map_char map)
{
switch (k.getKind())
@@ -122,17 +141,7 @@ class KeyModifier
case Char: name = apply_fn_char(k.getChar()); break;
case Keyevent: name = apply_fn_keyevent(k.getKeyevent()); break;
case Event: name = apply_fn_event(k.getEvent()); break;
case String:
switch (k.getString())
{
case "":
if (k == KeyValue.getKeyByName("f11_placeholder"))
name = "f11";
else if (k == KeyValue.getKeyByName("f12_placeholder"))
name = "f12";
break;
}
break;
case Placeholder: name = apply_fn_placeholder(k.getPlaceholder()); break;
}
return (name == null) ? k : KeyValue.getKeyByName(name);
}
@@ -160,6 +169,20 @@ class KeyModifier
}
}
private static String apply_fn_placeholder(KeyValue.Placeholder p)
{
switch (p)
{
case F11: return "f11";
case F12: return "f12";
case SHINDOT: return "shindot";
case SINDOT: return "sindot";
case OLE: return "ole";
case METEG: return "meteg";
default: return null;
}
}
/** Return the name of modified key, or [null]. */
private static String apply_fn_char(char c)
{
@@ -198,6 +221,7 @@ class KeyModifier
case ',': return "·";
case '!': return "¡";
case '?': return "¿";
case '|': return "¦";
// arrows
case '↖': return "";
case '↑': return "";
@@ -243,6 +267,76 @@ class KeyModifier
case '⊂': return "";
case '⊃': return "";
case '±': return "";
// hebrew niqqud
case 'ק': return "qamats"; // kamatz
case 'ר': return "hataf_qamats"; // reduced kamatz
case 'ו': return "holam";
case 'ם': return "rafe";
case 'פ': return "patah"; // patach
case 'ש': return "sheva";
case 'ד': return "dagesh"; // or mapiq
case 'ח': return "hiriq";
case 'ף': return "hataf_patah"; // reduced patach
case 'ז': return "qubuts"; // kubuts
case 'ס': return "segol";
case 'ב': return "hataf_segol"; // reduced segol
case 'צ': return "tsere";
// Devanagari symbols
case 'ए': return "";
case 'े': return "";
case 'ऐ': return "";
case 'ै': return "";
case 'ऋ': return "";
case 'ृ': return "";
case 'ळ': return "";
case 'र': return "";
case 'क': return "";
case 'ख': return "";
case 'ग': return "";
case 'घ': return "";
case 'ढ': return "";
case 'न': return "";
case 'ड': return "";
case 'ट': return "";
case 'ण': return "";
case 'फ': return "";
case 'ऌ': return "";
case 'ॢ': return "";
case 'औ': return "";
case 'ौ': return "";
case 'ओ': return "";
case 'ो': return "";
case 'च': return "";
case 'ज': return "";
case 'ब': return "ॿ";
case 'व': return "";
case 'य': return "";
case 'अ': return "";
case 'आ': return "";
case 'ा': return "";
case 'झ': return "";
case 'ई': return "";
case 'ी': return "";
case 'इ': return "";
case 'ि': return "";
case 'उ': return "";
case 'ऊ': return "";
case 'ु': return "";
case 'ष': return "क्ष";
case 'थ': return "त्र";
case 'द': return "द्र";
case 'प': return "प्र";
case 'श': return "श्र";
case 'छ': return "श्च";
case 'ँ': return "";
case '₹': return "";
case 'ॖ': return "";
case '॓': return "";
case '॰': return "";
case '।': return "";
case 'ं': return "";
case '़': return "";
case 'ऽ': return "";
// other
case ' ': return "nbsp";
default: return null;
@@ -551,4 +645,72 @@ class KeyModifier
}
}
};
private static final Map_char map_char_dot_below =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'ạ';
case 'ă': return 'ặ';
case 'â': return 'ậ';
case 'e': return 'ẹ';
case 'ê': return 'ệ';
case 'i': return 'ị';
case 'o': return 'ọ';
case 'ô': return 'ộ';
case 'ơ': return 'ợ';
case 'u': return 'ụ';
case 'ư': return 'ự';
case 'y': return 'ỵ';
default: return c;
}
}
};
private static final Map_char map_char_horn =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'o': return 'ơ';
case 'ó': return 'ớ';
case 'ò': return 'ờ';
case 'ỏ': return 'ở';
case 'õ': return 'ỡ';
case 'ọ': return 'ợ';
case 'u': return 'ư';
case 'ú': return 'ứ';
case 'ù': return 'ừ';
case 'ủ': return 'ử';
case 'ũ': return 'ữ';
case 'ụ': return 'ự';
default: return c;
}
}
};
private static final Map_char map_char_hook_above =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'ả';
case 'ă': return 'ẳ';
case 'â': return 'ẩ';
case 'e': return 'ẻ';
case 'ê': return 'ể';
case 'i': return 'ỉ';
case 'o': return 'ỏ';
case 'ô': return 'ổ';
case 'ơ': return 'ở';
case 'u': return 'ủ';
case 'ư': return 'ử';
case 'y': return 'ỷ';
default: return c;
}
}
};
}

View File

@@ -1,6 +1,5 @@
package juloo.keyboard2;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import java.util.HashMap;
@@ -14,6 +13,7 @@ final class KeyValue
SWITCH_EMOJI,
SWITCH_BACK_EMOJI,
CHANGE_METHOD,
CHANGE_METHOD_PREV,
ACTION,
SWITCH_SECOND,
SWITCH_SECOND_BACK,
@@ -30,12 +30,15 @@ final class KeyValue
META,
DOUBLE_AIGU,
DOT_ABOVE,
DOT_BELOW,
GRAVE,
AIGU,
CIRCONFLEXE,
TILDE,
CEDILLE,
TREMA,
HORN,
HOOK_ABOVE,
SUPERSCRIPT,
SUBSCRIPT,
RING,
@@ -68,9 +71,20 @@ final class KeyValue
AUTOFILL,
}
public static enum Placeholder
{
REMOVED,
F11,
F12,
SHINDOT,
SINDOT,
OLE,
METEG
}
public static enum Kind
{
Char, String, Keyevent, Event, Modifier, Editing
Char, String, Keyevent, Event, Modifier, Editing, Placeholder
}
// Behavior flags.
@@ -78,7 +92,7 @@ final class KeyValue
public static final int FLAG_LOCK = (1 << 21);
// Special keys are not repeated and don't clear latched modifiers.
public static final int FLAG_SPECIAL = (1 << 22);
public static final int FLAG_PRECISE_REPEAT = (1 << 23);
// Free flag: (1 << 23);
// Rendering flags.
public static final int FLAG_KEY_FONT = (1 << 24); // special font file
public static final int FLAG_SMALLER_FONT = (1 << 25); // 25% smaller symbols
@@ -154,6 +168,11 @@ final class KeyValue
return Editing.values()[(_code & VALUE_BITS)];
}
public Placeholder getPlaceholder()
{
return Placeholder.values()[(_code & VALUE_BITS)];
}
/* Update the char and the symbol. */
public KeyValue withChar(char c)
{
@@ -183,7 +202,14 @@ final class KeyValue
@Override
public boolean equals(Object obj)
{
KeyValue snd = (KeyValue)obj;
return sameKey((KeyValue)obj);
}
/** Type-safe alternative to [equals]. */
public boolean sameKey(KeyValue snd)
{
if (snd == null)
return false;
return _symbol.equals(snd._symbol) && _code == snd._code;
}
@@ -193,8 +219,6 @@ final class KeyValue
return _symbol.hashCode() + _code;
}
private static HashMap<String, KeyValue> keys = new HashMap<String, KeyValue>();
public KeyValue(String s, int kind, int value, int flags)
{
check((kind & ~KIND_BITS) == 0);
@@ -209,169 +233,205 @@ final class KeyValue
this(s, (k.ordinal() << 29), v, f);
}
public static KeyValue getKeyByName(String name)
private static KeyValue charKey(String symbol, char c, int flags)
{
return new KeyValue(symbol, Kind.Char, c, flags);
}
private static KeyValue modifierKey(String symbol, Modifier m, int flags)
{
if (symbol.length() > 1)
flags |= FLAG_SMALLER_FONT;
return new KeyValue(symbol, Kind.Modifier, m.ordinal(),
FLAG_LATCH | FLAG_SPECIAL | FLAG_SECONDARY | flags);
}
private static KeyValue modifierKey(int symbol, Modifier m, int flags)
{
return modifierKey(String.valueOf((char)symbol), m, flags | FLAG_KEY_FONT);
}
private static KeyValue diacritic(int symbol, Modifier m)
{
return new KeyValue(String.valueOf((char)symbol), Kind.Modifier, m.ordinal(),
FLAG_LATCH | FLAG_SPECIAL | FLAG_KEY_FONT);
}
private static KeyValue eventKey(String symbol, Event e, int flags)
{
return new KeyValue(symbol, Kind.Event, e.ordinal(), flags | FLAG_SPECIAL | FLAG_SECONDARY);
}
private static KeyValue eventKey(int symbol, Event e, int flags)
{
return eventKey(String.valueOf((char)symbol), e, flags | FLAG_KEY_FONT);
}
private static KeyValue keyeventKey(String symbol, int code, int flags)
{
return new KeyValue(symbol, Kind.Keyevent, code, flags | FLAG_SECONDARY);
}
private static KeyValue keyeventKey(int symbol, int code, int flags)
{
return keyeventKey(String.valueOf((char)symbol), code, flags | FLAG_KEY_FONT);
}
private static KeyValue editingKey(String symbol, Editing action)
{
return new KeyValue(symbol, Kind.Editing, action.ordinal(),
FLAG_SPECIAL | FLAG_SECONDARY | FLAG_SMALLER_FONT);
}
/** A key that do nothing but has a unique ID. */
private static KeyValue placeholderKey(Placeholder id)
{
return new KeyValue("", Kind.Placeholder, id.ordinal(), 0);
}
private static KeyValue fallbackMakeKey(String name)
{
KeyValue kv = keys.get(name);
if (kv != null)
return kv;
if (name.length() == 1)
return new KeyValue(name, Kind.Char, name.charAt(0), 0);
else
return new KeyValue(name, Kind.String, 0, 0);
}
private static void addKey(String name, String symbol, Kind kind, int code, int flags)
public static KeyValue getKeyByName(String name)
{
keys.put(name, new KeyValue(symbol, kind, code, flags));
}
switch (name)
{
case "shift": return modifierKey(0x0A, Modifier.SHIFT, 0);
case "ctrl": return modifierKey("Ctrl", Modifier.CTRL, 0);
case "alt": return modifierKey("Alt", Modifier.ALT, 0);
case "accent_aigu": return diacritic(0x50, Modifier.AIGU);
case "accent_caron": return diacritic(0x51, Modifier.CARON);
case "accent_cedille": return diacritic(0x52, Modifier.CEDILLE);
case "accent_circonflexe": return diacritic(0x53, Modifier.CIRCONFLEXE);
case "accent_grave": return diacritic(0x54, Modifier.GRAVE);
case "accent_macron": return diacritic(0x55, Modifier.MACRON);
case "accent_ring": return diacritic(0x56, Modifier.RING);
case "accent_tilde": return diacritic(0x57, Modifier.TILDE);
case "accent_trema": return diacritic(0x58, Modifier.TREMA);
case "accent_ogonek": return diacritic(0x59, Modifier.OGONEK);
case "accent_dot_above": return diacritic(0x5A, Modifier.DOT_ABOVE);
case "accent_double_aigu": return diacritic(0x5B, Modifier.DOUBLE_AIGU);
case "accent_slash": return diacritic(0x5C, Modifier.SLASH);
case "accent_arrow_right": return diacritic(0x5D, Modifier.ARROW_RIGHT);
case "accent_breve": return diacritic(0x5E, Modifier.BREVE);
case "accent_bar": return diacritic(0x5F, Modifier.BAR);
case "accent_dot_below": return diacritic(0x60, Modifier.DOT_BELOW);
case "accent_horn": return diacritic(0x61, Modifier.HORN);
case "accent_hook_above": return diacritic(0x62, Modifier.HOOK_ABOVE);
case "superscript": return modifierKey("Sup", Modifier.SUPERSCRIPT, 0);
case "subscript": return modifierKey("Sub", Modifier.SUBSCRIPT, 0);
case "ordinal": return modifierKey("Ord", Modifier.ORDINAL, 0);
case "arrows": return modifierKey("Arr", Modifier.ARROWS, 0);
case "box": return modifierKey("Box", Modifier.BOX, 0);
case "fn": return modifierKey("Fn", Modifier.FN, 0);
case "meta": return modifierKey("Meta", Modifier.META, 0);
private static void addCharKey(String name, String symbol, char c, int flags)
{
addKey(name, symbol, Kind.Char, c, flags);
}
case "config": return eventKey(0x04, Event.CONFIG, FLAG_SMALLER_FONT);
case "switch_text": return eventKey("ABC", Event.SWITCH_TEXT, FLAG_SMALLER_FONT);
case "switch_numeric": return eventKey("123+", Event.SWITCH_NUMERIC, FLAG_SMALLER_FONT);
case "switch_emoji": return eventKey(0x01, Event.SWITCH_EMOJI, FLAG_SMALLER_FONT);
case "switch_back_emoji": return eventKey("ABC", Event.SWITCH_BACK_EMOJI, 0);
case "switch_second": return eventKey(0x13, Event.SWITCH_SECOND, FLAG_SMALLER_FONT);
case "switch_second_back": return eventKey(0x14, Event.SWITCH_SECOND_BACK, FLAG_SMALLER_FONT);
case "switch_greekmath": return eventKey("πλ∇¬", Event.SWITCH_GREEKMATH, FLAG_SMALLER_FONT);
case "change_method": return eventKey(0x09, Event.CHANGE_METHOD, FLAG_SMALLER_FONT);
case "change_method_prev": return eventKey(0x09, Event.CHANGE_METHOD_PREV, FLAG_SMALLER_FONT);
case "action": return eventKey("Action", Event.ACTION, FLAG_SMALLER_FONT); // Will always be replaced
case "capslock": return eventKey(0x12, Event.CAPS_LOCK, 0);
private static void addModifierKey(String name, String symbol, Modifier m, int flags)
{
if (symbol.length() > 1)
flags |= FLAG_SMALLER_FONT;
addKey(name, symbol, Kind.Modifier, m.ordinal(),
FLAG_LATCH | FLAG_SPECIAL | FLAG_SECONDARY | flags);
}
case "esc": return keyeventKey("Esc", KeyEvent.KEYCODE_ESCAPE, FLAG_SMALLER_FONT);
case "enter": return keyeventKey(0x0E, KeyEvent.KEYCODE_ENTER, 0);
case "up": return keyeventKey(0x05, KeyEvent.KEYCODE_DPAD_UP, 0);
case "right": return keyeventKey(0x06, KeyEvent.KEYCODE_DPAD_RIGHT, 0);
case "down": return keyeventKey(0x07, KeyEvent.KEYCODE_DPAD_DOWN, 0);
case "left": return keyeventKey(0x08, KeyEvent.KEYCODE_DPAD_LEFT, 0);
case "page_up": return keyeventKey(0x02, KeyEvent.KEYCODE_PAGE_UP, 0);
case "page_down": return keyeventKey(0x03, KeyEvent.KEYCODE_PAGE_DOWN, 0);
case "home": return keyeventKey(0x0B, KeyEvent.KEYCODE_MOVE_HOME, 0);
case "end": return keyeventKey(0x0C, KeyEvent.KEYCODE_MOVE_END, 0);
case "backspace": return keyeventKey(0x11, KeyEvent.KEYCODE_DEL, 0);
case "delete": return keyeventKey(0x10, KeyEvent.KEYCODE_FORWARD_DEL, 0);
case "insert": return keyeventKey("Ins", KeyEvent.KEYCODE_INSERT, FLAG_SMALLER_FONT);
case "f1": return keyeventKey("F1", KeyEvent.KEYCODE_F1, 0);
case "f2": return keyeventKey("F2", KeyEvent.KEYCODE_F2, 0);
case "f3": return keyeventKey("F3", KeyEvent.KEYCODE_F3, 0);
case "f4": return keyeventKey("F4", KeyEvent.KEYCODE_F4, 0);
case "f5": return keyeventKey("F5", KeyEvent.KEYCODE_F5, 0);
case "f6": return keyeventKey("F6", KeyEvent.KEYCODE_F6, 0);
case "f7": return keyeventKey("F7", KeyEvent.KEYCODE_F7, 0);
case "f8": return keyeventKey("F8", KeyEvent.KEYCODE_F8, 0);
case "f9": return keyeventKey("F9", KeyEvent.KEYCODE_F9, 0);
case "f10": return keyeventKey("F10", KeyEvent.KEYCODE_F10, 0);
case "f11": return keyeventKey("F11", KeyEvent.KEYCODE_F11, FLAG_SMALLER_FONT);
case "f12": return keyeventKey("F12", KeyEvent.KEYCODE_F12, FLAG_SMALLER_FONT);
case "tab": return keyeventKey(0x0F, KeyEvent.KEYCODE_TAB, FLAG_SMALLER_FONT);
private static void addModifierKey(String name, int symbol, Modifier m, int flags)
{
addModifierKey(name, String.valueOf((char)symbol), m, flags | FLAG_KEY_FONT);
}
case "\\t": return charKey("\\t", '\t', 0); // Send the tab character
case "space": return charKey("\r", ' ', FLAG_KEY_FONT | FLAG_SECONDARY);
case "nbsp": return charKey("\u237d", '\u00a0', FLAG_SMALLER_FONT);
private static void addDiacritic(String name, int symbol, Modifier m)
{
addKey(name, String.valueOf((char)symbol), Kind.Modifier, m.ordinal(),
FLAG_LATCH | FLAG_SPECIAL | FLAG_KEY_FONT);
}
/* bidi */
case "lrm": return charKey("", '\u200e', 0); // Send left-to-right mark
case "rlm": return charKey("", '\u200f', 0); // Send right-to-left mark
case "b(": return charKey("(", ')', 0);
case "b)": return charKey(")", '(', 0);
case "b[": return charKey("[", ']', 0);
case "b]": return charKey("]", '[', 0);
case "b{": return charKey("{", '}', 0);
case "b}": return charKey("}", '{', 0);
case "blt": return charKey("<", '>', 0);
case "bgt": return charKey(">", '<', 0);
private static void addEventKey(String name, String symbol, Event e, int flags)
{
addKey(name, symbol, Kind.Event, e.ordinal(), flags | FLAG_SPECIAL | FLAG_SECONDARY);
}
case "removed": return placeholderKey(Placeholder.REMOVED);
case "f11_placeholder": return placeholderKey(Placeholder.F11);
case "f12_placeholder": return placeholderKey(Placeholder.F12);
private static void addEventKey(String name, int symbol, Event e, int flags)
{
addEventKey(name, String.valueOf((char)symbol), e, flags | FLAG_KEY_FONT);
}
/* hebrew niqqud */
case "qamats": return charKey("\u05E7\u05B8", '\u05B8', 0); // kamatz
case "patah": return charKey("\u05E4\u05B7", '\u05B7', 0); // patach
case "sheva": return charKey("\u05E9\u05B0", '\u05B0', 0);
case "dagesh": return charKey("\u05D3\u05BC", '\u05BC', 0); // or mapiq
case "hiriq": return charKey("\u05D7\u05B4", '\u05B4', 0);
case "segol": return charKey("\u05E1\u05B6", '\u05B6', 0);
case "tsere": return charKey("\u05E6\u05B5", '\u05B5', 0);
case "holam": return charKey("\u05D5\u05B9", '\u05B9', 0);
case "qubuts": return charKey("\u05E7\u05BB", '\u05BB', 0); // kubuts
case "hataf_patah": return charKey("\u05D7\u05B2\u05E4\u05B7", '\u05B2', 0); // reduced patach
case "hataf_qamats": return charKey("\u05D7\u05B3\u05E7\u05B8", '\u05B3', 0); // reduced kamatz
case "hataf_segol": return charKey("\u05D7\u05B1\u05E1\u05B6", '\u05B1', 0); // reduced segol
case "shindot": return charKey("\u05E9\u05C1", '\u05C1', 0);
case "shindot_placeholder": return placeholderKey(Placeholder.SHINDOT);
case "sindot": return charKey("\u05E9\u05C2", '\u05C2', 0);
case "sindot_placeholder": return placeholderKey(Placeholder.SINDOT);
/* hebrew punctuation */
case "geresh": return charKey("\u05F3", '\u05F3', 0);
case "gershayim": return charKey("\u05F4", '\u05F4', 0);
case "maqaf": return charKey("\u05BE", '\u05BE', 0);
/* hebrew biblical */
case "rafe": return charKey("\u05E4\u05BF", '\u05BF', 0);
case "ole": return charKey("\u05E2\u05AB", '\u05AB', 0);
case "ole_placeholder": return placeholderKey(Placeholder.OLE);
case "meteg": return charKey("\u05DE\u05BD", '\u05BD', 0); // or siluq or sof-pasuq
case "meteg_placeholder": return placeholderKey(Placeholder.METEG);
private static void addKeyeventKey(String name, String symbol, int code, int flags)
{
addKey(name, symbol, Kind.Keyevent, code, flags | FLAG_SECONDARY);
}
private static void addKeyeventKey(String name, int symbol, int code, int flags)
{
addKeyeventKey(name, String.valueOf((char)symbol), code, flags | FLAG_KEY_FONT);
}
private static void addEditingKey(String name, String symbol, Editing action)
{
addKey(name, symbol, Kind.Editing, action.ordinal(),
FLAG_SPECIAL | FLAG_SECONDARY | FLAG_SMALLER_FONT);
}
// Within VALUE_BITS
private static int placeholder_unique_id = 0;
/** Use a unique id as the value because the symbol is shared between every
placeholders (it is the empty string). */
private static void addPlaceholderKey(String name)
{
addKey(name, "", Kind.String, placeholder_unique_id++, 0);
}
static
{
addModifierKey("shift", 0x0A, Modifier.SHIFT, 0);
addModifierKey("ctrl", "Ctrl", Modifier.CTRL, 0);
addModifierKey("alt", "Alt", Modifier.ALT, 0);
addDiacritic("accent_aigu", 0x50, Modifier.AIGU);
addDiacritic("accent_caron", 0x51, Modifier.CARON);
addDiacritic("accent_cedille", 0x52, Modifier.CEDILLE);
addDiacritic("accent_circonflexe", 0x53, Modifier.CIRCONFLEXE);
addDiacritic("accent_grave", 0x54, Modifier.GRAVE);
addDiacritic("accent_macron", 0x55, Modifier.MACRON);
addDiacritic("accent_ring", 0x56, Modifier.RING);
addDiacritic("accent_tilde", 0x57, Modifier.TILDE);
addDiacritic("accent_trema", 0x58, Modifier.TREMA);
addDiacritic("accent_ogonek", 0x59, Modifier.OGONEK);
addDiacritic("accent_dot_above", 0x5A, Modifier.DOT_ABOVE);
addDiacritic("accent_double_aigu", 0x5B, Modifier.DOUBLE_AIGU);
addDiacritic("accent_slash", 0x5C, Modifier.SLASH);
addDiacritic("accent_arrow_right", 0x5D, Modifier.ARROW_RIGHT);
addDiacritic("accent_breve", 0x5E, Modifier.BREVE);
addDiacritic("accent_bar", 0x5F, Modifier.BAR);
addModifierKey("superscript", "Sup", Modifier.SUPERSCRIPT, 0);
addModifierKey("subscript", "Sub", Modifier.SUBSCRIPT, 0);
addModifierKey("ordinal", "Ord", Modifier.ORDINAL, 0);
addModifierKey("arrows", "Arr", Modifier.ARROWS, 0);
addModifierKey("box", "Box", Modifier.BOX, 0);
addModifierKey("fn", "Fn", Modifier.FN, 0);
addModifierKey("meta", "Meta", Modifier.META, 0);
addEventKey("config", 0x04, Event.CONFIG, FLAG_SMALLER_FONT);
addEventKey("switch_text", "ABC", Event.SWITCH_TEXT, FLAG_SMALLER_FONT);
addEventKey("switch_numeric", "123+", Event.SWITCH_NUMERIC, FLAG_SMALLER_FONT);
addEventKey("switch_emoji", 0x01, Event.SWITCH_EMOJI, FLAG_SMALLER_FONT);
addEventKey("switch_back_emoji", "ABC", Event.SWITCH_BACK_EMOJI, 0);
addEventKey("switch_second", 0x13, Event.SWITCH_SECOND, FLAG_SMALLER_FONT);
addEventKey("switch_second_back", 0x14, Event.SWITCH_SECOND_BACK, FLAG_SMALLER_FONT);
addEventKey("switch_greekmath", "πλ∇¬", Event.SWITCH_GREEKMATH, FLAG_SMALLER_FONT);
addEventKey("change_method", 0x09, Event.CHANGE_METHOD, FLAG_SMALLER_FONT);
addEventKey("action", "Action", Event.ACTION, FLAG_SMALLER_FONT); // Will always be replaced
addEventKey("capslock", 0x12, Event.CAPS_LOCK, 0);
addKeyeventKey("esc", "Esc", KeyEvent.KEYCODE_ESCAPE, FLAG_SMALLER_FONT);
addKeyeventKey("enter", 0x0E, KeyEvent.KEYCODE_ENTER, 0);
addKeyeventKey("up", 0x05, KeyEvent.KEYCODE_DPAD_UP, FLAG_PRECISE_REPEAT);
addKeyeventKey("right", 0x06, KeyEvent.KEYCODE_DPAD_RIGHT, FLAG_PRECISE_REPEAT);
addKeyeventKey("down", 0x07, KeyEvent.KEYCODE_DPAD_DOWN, FLAG_PRECISE_REPEAT);
addKeyeventKey("left", 0x08, KeyEvent.KEYCODE_DPAD_LEFT, FLAG_PRECISE_REPEAT);
addKeyeventKey("page_up", 0x02, KeyEvent.KEYCODE_PAGE_UP, 0);
addKeyeventKey("page_down", 0x03, KeyEvent.KEYCODE_PAGE_DOWN, 0);
addKeyeventKey("home", 0x0B, KeyEvent.KEYCODE_MOVE_HOME, 0);
addKeyeventKey("end", 0x0C, KeyEvent.KEYCODE_MOVE_END, 0);
addKeyeventKey("backspace", 0x11, KeyEvent.KEYCODE_DEL, 0);
addKeyeventKey("delete", 0x10, KeyEvent.KEYCODE_FORWARD_DEL, 0);
addKeyeventKey("insert", "Ins", KeyEvent.KEYCODE_INSERT, FLAG_SMALLER_FONT);
addKeyeventKey("f1", "F1", KeyEvent.KEYCODE_F1, 0);
addKeyeventKey("f2", "F2", KeyEvent.KEYCODE_F2, 0);
addKeyeventKey("f3", "F3", KeyEvent.KEYCODE_F3, 0);
addKeyeventKey("f4", "F4", KeyEvent.KEYCODE_F4, 0);
addKeyeventKey("f5", "F5", KeyEvent.KEYCODE_F5, 0);
addKeyeventKey("f6", "F6", KeyEvent.KEYCODE_F6, 0);
addKeyeventKey("f7", "F7", KeyEvent.KEYCODE_F7, 0);
addKeyeventKey("f8", "F8", KeyEvent.KEYCODE_F8, 0);
addKeyeventKey("f9", "F9", KeyEvent.KEYCODE_F9, 0);
addKeyeventKey("f10", "F10", KeyEvent.KEYCODE_F10, 0);
addKeyeventKey("f11", "F11", KeyEvent.KEYCODE_F11, FLAG_SMALLER_FONT);
addKeyeventKey("f12", "F12", KeyEvent.KEYCODE_F12, FLAG_SMALLER_FONT);
addKeyeventKey("tab", 0x0F, KeyEvent.KEYCODE_TAB, FLAG_SMALLER_FONT);
addCharKey("\\t", "\\t", '\t', 0); // Send the tab character
addCharKey("space", "\r", ' ', FLAG_KEY_FONT | FLAG_SECONDARY);
addCharKey("nbsp", "\u237d", '\u00a0', FLAG_SMALLER_FONT);
addPlaceholderKey("removed");
addPlaceholderKey("f11_placeholder");
addPlaceholderKey("f12_placeholder");
addEditingKey("copy", "copy", Editing.COPY);
addEditingKey("paste", "paste", Editing.PASTE);
addEditingKey("cut", "cut", Editing.CUT);
addEditingKey("selectAll", "s. all", Editing.SELECT_ALL);
addEditingKey("shareText", "share", Editing.SHARE);
addEditingKey("pasteAsPlainText", "<paste>", Editing.PASTE_PLAIN);
addEditingKey("undo", "undo", Editing.UNDO);
addEditingKey("redo", "redo", Editing.REDO);
addEditingKey("replaceText", "repl.", Editing.REPLACE);
addEditingKey("textAssist", "assist", Editing.ASSIST);
addEditingKey("autofill", "auto.", Editing.AUTOFILL);
case "copy": return editingKey("copy", Editing.COPY);
case "paste": return editingKey("paste", Editing.PASTE);
case "cut": return editingKey("cut", Editing.CUT);
case "selectAll": return editingKey("s. all", Editing.SELECT_ALL);
case "shareText": return editingKey("share", Editing.SHARE);
case "pasteAsPlainText": return editingKey("<paste>", Editing.PASTE_PLAIN);
case "undo": return editingKey("undo", Editing.UNDO);
case "redo": return editingKey("redo", Editing.REDO);
case "replaceText": return editingKey("repl.", Editing.REPLACE);
case "textAssist": return editingKey("assist", Editing.ASSIST);
case "autofill": return editingKey("auto.", Editing.AUTOFILL);
default: return fallbackMakeKey(name);
}
}
static final HashMap<String, String> keys_descr = new HashMap<String, String>();

View File

@@ -47,9 +47,14 @@ public class Keyboard2 extends InputMethodService
{
if (_currentSpecialLayout != null)
return _currentSpecialLayout;
KeyboardData layout;
if (_currentTextLayout == Current_text_layout.SECONDARY)
return _config.second_layout;
return (_config.layout == null) ? _localeTextLayout : _config.layout;
layout = _config.second_layout;
else if (_config.layout == null)
layout = _localeTextLayout;
else
layout = _config.layout;
return _config.modify_layout(layout);
}
void setTextLayout(Current_text_layout layout)
@@ -59,6 +64,17 @@ public class Keyboard2 extends InputMethodService
_keyboardView.setKeyboard(current_layout());
}
void setSpecialLayout(KeyboardData l)
{
_currentSpecialLayout = l;
_keyboardView.setKeyboard(l);
}
KeyboardData loadLayout(int layout_id)
{
return KeyboardData.load(getResources(), layout_id);
}
@Override
public void onCreate()
{
@@ -243,7 +259,8 @@ public class Keyboard2 extends InputMethodService
case InputType.TYPE_CLASS_NUMBER:
case InputType.TYPE_CLASS_PHONE:
case InputType.TYPE_CLASS_DATETIME:
_currentSpecialLayout = KeyboardData.load_pin_entry(getResources());
_currentSpecialLayout =
_config.modify_numpad(KeyboardData.load(getResources(), R.xml.pin));
break;
default:
_currentSpecialLayout = null;
@@ -312,12 +329,21 @@ public class Keyboard2 extends InputMethodService
/** Not static */
public class Receiver implements KeyEventHandler.IReceiver
{
public void switchToNextInputMethod()
public void switchInputMethod()
{
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
// deprecated in version 28: imm.switchToNextInputMethod(getConnectionToken(), false);
// added in version 28: switchToNextInputMethod(false);
}
public void switchToPrevInputMethod()
{
if (VERSION.SDK_INT < 28)
{
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.switchToLastInputMethod(getConnectionToken());
}
else
Keyboard2.this.switchToPreviousInputMethod();
}
public void setPane_emoji()
@@ -337,26 +363,28 @@ public class Keyboard2 extends InputMethodService
_keyboardView.set_shift_state(state, lock);
}
public void switch_text()
public void set_layout(KeyEventHandler.Layout l)
{
_currentSpecialLayout = null;
_keyboardView.setKeyboard(current_layout());
}
public void switch_layout(int layout_id)
{
_keyboardView.setKeyboard(KeyboardData.load(getResources(), layout_id));
}
public void switch_second()
{
if (_config.second_layout != null)
setTextLayout(Current_text_layout.SECONDARY);
}
public void switch_primary()
{
setTextLayout(Current_text_layout.PRIMARY);
switch (l)
{
case Current:
_currentSpecialLayout = null;
_keyboardView.setKeyboard(current_layout());
break;
case Primary:
setTextLayout(Current_text_layout.PRIMARY);
break;
case Secondary:
if (_config.second_layout != null)
setTextLayout(Current_text_layout.SECONDARY);
break;
case Numeric:
setSpecialLayout(_config.modify_numpad(loadLayout(R.xml.numeric)));
break;
case Greekmath:
setSpecialLayout(_config.modify_numpad(loadLayout(R.xml.greekmath)));
break;
}
}
public void showKeyboardConfig()

View File

@@ -81,7 +81,7 @@ public class Keyboard2View extends View
public void setKeyboard(KeyboardData kw)
{
_keyboard = _config.modify_layout(kw);
_keyboard = kw;
_shift_kv = KeyValue.getKeyByName("shift");
_shift_key = _keyboard.findKeyWithValue(_shift_kv);
if (_shift_key == null)
@@ -105,10 +105,19 @@ public class Keyboard2View extends View
{
if (_keyboard == null || _shift_key == null)
return;
int flags = _pointers.getKeyFlags(_shift_key, _shift_kv);
if (state)
{
if (flags != -1 && !lock)
return; // Don't replace an existing pointer
_pointers.add_fake_pointer(_shift_kv, _shift_key, lock);
}
else
{
if ((flags & KeyValue.FLAG_FAKE_PTR) != 0)
return; // Don't remove locked pointers
_pointers.remove_fake_pointer(_shift_kv, _shift_key);
}
invalidate();
}
@@ -229,7 +238,6 @@ public class Keyboard2View extends View
int width = dm.widthPixels;
int height =
(int)(_config.keyHeight * _keyboard.keysHeight
+ _keyboard.rows.size()
+ _config.marginTop + _config.margin_bottom);
setMeasuredDimension(width, height);
_keyWidth = (width - (_config.horizontal_margin * 2)) / _keyboard.keysWidth;
@@ -252,6 +260,19 @@ public class Keyboard2View extends View
}
}
/** Horizontal and vertical position of the 9 indexes. */
static final Paint.Align[] LABEL_POSITION_H = new Paint.Align[]{
Paint.Align.CENTER, Paint.Align.LEFT, Paint.Align.RIGHT, Paint.Align.LEFT,
Paint.Align.RIGHT, Paint.Align.LEFT, Paint.Align.RIGHT,
Paint.Align.CENTER, Paint.Align.CENTER
};
static final Vertical[] LABEL_POSITION_V = new Vertical[]{
Vertical.CENTER, Vertical.TOP, Vertical.TOP, Vertical.BOTTOM,
Vertical.BOTTOM, Vertical.CENTER, Vertical.CENTER, Vertical.TOP,
Vertical.BOTTOM
};
@Override
protected void onDraw(Canvas canvas)
{
@@ -274,20 +295,12 @@ public class Keyboard2View extends View
float keyW = _keyWidth * k.width - _config.keyHorizontalInterval;
boolean isKeyDown = _pointers.isKeyDown(k);
drawKeyFrame(canvas, x, y, keyW, keyH, isKeyDown);
drawLabel(canvas, k.key0, keyW / 2f + x, y, keyH, isKeyDown);
if (k.edgekeys)
if (k.keys[0] != null)
drawLabel(canvas, k.keys[0], keyW / 2f + x, y, keyH, isKeyDown);
for (int i = 1; i < 9; i++)
{
drawSubLabel(canvas, k.key1, x, y, keyW, keyH, Paint.Align.CENTER, Vertical.TOP, isKeyDown);
drawSubLabel(canvas, k.key3, x, y, keyW, keyH, Paint.Align.LEFT, Vertical.CENTER, isKeyDown);
drawSubLabel(canvas, k.key2, x, y, keyW, keyH, Paint.Align.RIGHT, Vertical.CENTER, isKeyDown);
drawSubLabel(canvas, k.key4, x, y, keyW, keyH, Paint.Align.CENTER, Vertical.BOTTOM, isKeyDown);
}
else
{
drawSubLabel(canvas, k.key1, x, y, keyW, keyH, Paint.Align.LEFT, Vertical.TOP, isKeyDown);
drawSubLabel(canvas, k.key3, x, y, keyW, keyH, Paint.Align.LEFT, Vertical.BOTTOM, isKeyDown);
drawSubLabel(canvas, k.key2, x, y, keyW, keyH, Paint.Align.RIGHT, Vertical.TOP, isKeyDown);
drawSubLabel(canvas, k.key4, x, y, keyW, keyH, Paint.Align.RIGHT, Vertical.BOTTOM, isKeyDown);
if (k.keys[i] != null)
drawSubLabel(canvas, k.keys[i], x, y, keyW, keyH, i, isKeyDown);
}
if (k.indication != null)
{
@@ -357,11 +370,9 @@ public class Keyboard2View extends View
return sublabel ? _theme.subLabelColor : _theme.labelColor;
}
private void drawLabel(Canvas canvas, KeyboardData.Corner k, float x, float y, float keyH, boolean isKeyDown)
private void drawLabel(Canvas canvas, KeyValue kv, float x, float y, float keyH, boolean isKeyDown)
{
if (k == null)
return;
KeyValue kv = KeyModifier.modify(k.kv, _mods);
kv = KeyModifier.modify(kv, _mods);
if (kv == null)
return;
float textSize = scaleTextSize(kv, _config.labelTextSize, keyH);
@@ -372,13 +383,12 @@ public class Keyboard2View extends View
canvas.drawText(kv.getString(), x, (keyH - p.ascent() - p.descent()) / 2f + y, p);
}
private void drawSubLabel(Canvas canvas, KeyboardData.Corner k, float x,
float y, float keyW, float keyH, Paint.Align a, Vertical v,
boolean isKeyDown)
private void drawSubLabel(Canvas canvas, KeyValue kv, float x, float y,
float keyW, float keyH, int sub_index, boolean isKeyDown)
{
if (k == null)
return;
KeyValue kv = KeyModifier.modify(k.kv, _mods);
Paint.Align a = LABEL_POSITION_H[sub_index];
Vertical v = LABEL_POSITION_V[sub_index];
kv = KeyModifier.modify(kv, _mods);
if (kv == null)
return;
float textSize = scaleTextSize(kv, _config.sublabelTextSize, keyH);

View File

@@ -5,10 +5,12 @@ import android.content.res.XmlResourceParser;
import android.util.Xml;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import org.xmlpull.v1.XmlPullParser;
@@ -19,17 +21,13 @@ class KeyboardData
public final float keysWidth;
/** Total height of the keyboard. */
public final float keysHeight;
/** Whether to add extra keys. */
public final boolean extra_keys;
/** Whether to possibly add NumPad. */
public final boolean num_pad;
public KeyboardData mapKeys(MapKey f)
{
ArrayList<Row> rows_ = new ArrayList<Row>();
for (Row r : rows)
rows_.add(r.mapKeys(f));
return new KeyboardData(rows_, keysWidth, extra_keys, num_pad);
return new KeyboardData(rows_, keysWidth);
}
/** Add keys from the given iterator into the keyboard. Extra keys are added
@@ -38,8 +36,6 @@ class KeyboardData
* third row. */
public KeyboardData addExtraKeys(Iterator<KeyValue> k)
{
if (!extra_keys)
return this;
ArrayList<Row> rows = new ArrayList<Row>(this.rows);
addExtraKeys_to_row(rows, k, 1, 4);
addExtraKeys_to_row(rows, k, 1, 3);
@@ -51,15 +47,13 @@ class KeyboardData
for (int c = 1; c <= 4; c++)
addExtraKeys_to_row(rows, k, r, c);
}
return new KeyboardData(rows, keysWidth, extra_keys, num_pad);
return new KeyboardData(rows, keysWidth);
}
public KeyboardData addNumPad()
{
if (!num_pad)
return this;
ArrayList<Row> extendedRows = new ArrayList<Row>();
Iterator<Row> iterNumPadRows = _num_pad.rows.iterator();
Iterator<Row> iterNumPadRows = num_pad.rows.iterator();
for (Row row : rows)
{
ArrayList<KeyboardData.Key> keys = new ArrayList<Key>(row.keys);
@@ -76,7 +70,14 @@ class KeyboardData
}
extendedRows.add(new Row(keys, row.height, row.shift));
}
return new KeyboardData(extendedRows, compute_max_width(extendedRows), extra_keys, num_pad);
return new KeyboardData(extendedRows, compute_max_width(extendedRows));
}
public KeyboardData addNumberRow()
{
ArrayList<Row> rows_ = new ArrayList<Row>(this.rows);
rows_.add(0, number_row.updateWidth(keysWidth));
return new KeyboardData(rows_, keysWidth);
}
public Key findKeyWithValue(KeyValue kv)
@@ -90,6 +91,12 @@ class KeyboardData
return null;
}
public void getKeys(Set<KeyValue> dst)
{
for (Row r : rows)
r.getKeys(dst);
}
private static void addExtraKeys_to_row(ArrayList<Row> rows, final Iterator<KeyValue> extra_keys, int row_i, final int d)
{
if (!extra_keys.hasNext())
@@ -104,17 +111,18 @@ class KeyboardData
}));
}
private static Row _bottom_row;
private static KeyboardData _num_pad;
private static KeyboardData _pin_entry;
public static Row bottom_row;
public static Row number_row;
public static KeyboardData num_pad;
private static Map<Integer, KeyboardData> _layoutCache = new HashMap<Integer, KeyboardData>();
public static void init(Resources res)
{
try
{
_bottom_row = parse_bottom_row(res.getXml(R.xml.bottom_row));
_num_pad = parse_keyboard(res.getXml(R.xml.numpad));
bottom_row = parse_row(res.getXml(R.xml.bottom_row));
number_row = parse_row(res.getXml(R.xml.number_row));
num_pad = parse_keyboard(res.getXml(R.xml.numpad));
}
catch (Exception e)
{
@@ -122,13 +130,6 @@ class KeyboardData
}
}
public static KeyboardData load_pin_entry(Resources res)
{
if (_pin_entry == null)
_pin_entry = load(res, R.xml.pin);
return _pin_entry;
}
/** Load a layout from a resource ID. Returns [null] on error. */
public static KeyboardData load(Resources res, int id)
{
@@ -169,17 +170,15 @@ class KeyboardData
{
if (!expect_tag(parser, "keyboard"))
throw new Exception("Empty layout file");
boolean bottom_row = attribute_bool(parser, "bottom_row", true);
boolean extra_keys = attribute_bool(parser, "extra_keys", true);
boolean num_pad = attribute_bool(parser, "num_pad", true);
boolean add_bottom_row = attribute_bool(parser, "bottom_row", true);
float specified_kw = attribute_float(parser, "width", 0f);
ArrayList<Row> rows = new ArrayList<Row>();
while (expect_tag(parser, "row"))
rows.add(Row.parse(parser));
float kw = (specified_kw != 0f) ? specified_kw : compute_max_width(rows);
if (bottom_row)
rows.add(_bottom_row.updateWidth(kw));
return new KeyboardData(rows, kw, extra_keys, num_pad);
if (add_bottom_row)
rows.add(bottom_row.updateWidth(kw));
return new KeyboardData(rows, kw);
}
private static float compute_max_width(List<Row> rows)
@@ -190,14 +189,14 @@ class KeyboardData
return w;
}
private static Row parse_bottom_row(XmlPullParser parser) throws Exception
private static Row parse_row(XmlPullParser parser) throws Exception
{
if (!expect_tag(parser, "row"))
throw new Exception("Failed to parse bottom row");
throw new Exception("Failed to parse row");
return Row.parse(parser);
}
protected KeyboardData(List<Row> rows_, float kw, boolean xk, boolean np)
protected KeyboardData(List<Row> rows_, float kw)
{
float kh = 0.f;
for (Row r : rows_)
@@ -205,8 +204,6 @@ class KeyboardData
rows = rows_;
keysWidth = kw;
keysHeight = kh;
extra_keys = xk;
num_pad = np;
}
public static class Row
@@ -240,6 +237,12 @@ class KeyboardData
return new Row(keys, h, shift);
}
public void getKeys(Set<KeyValue> dst)
{
for (Key k : keys)
k.getKeys(dst);
}
public Row mapKeys(MapKey f)
{
ArrayList<Key> keys_ = new ArrayList<Key>();
@@ -268,187 +271,129 @@ class KeyboardData
public static class Key
{
/*
** 1 2
** 0
** 3 4
/**
* 1 7 2
* 5 0 6
* 3 8 4
*/
public final Corner key0;
public final Corner key1;
public final Corner key2;
public final Corner key3;
public final Corner key4;
public final KeyValue[] keys;
/** Pack flags for every key values. Flags are: [F_LOC]. */
private final int keysflags;
/** Key width in relative unit. */
public final float width;
/** Extra empty space on the left of the key. */
public final float shift;
/** Put keys 1 to 4 on the edges instead of the corners. */
public final boolean edgekeys;
/** Keys 2 and 3 are repeated as the finger moves laterally on the key.
Used for the left and right arrow keys on the space bar. */
public final boolean slider;
/** String printed on the keys. It has no other effect. */
public final String indication;
protected Key(Corner k0, Corner k1, Corner k2, Corner k3, Corner k4, float w, float s, boolean e, String i)
/** Whether a key was declared with the 'loc' prefix. */
public static final int F_LOC = 1;
public static final int ALL_FLAGS = F_LOC;
protected Key(KeyValue[] ks, int f, float w, float s, boolean sl, String i)
{
key0 = k0;
key1 = k1;
key2 = k2;
key3 = k3;
key4 = k4;
keys = ks;
keysflags = f;
width = w;
shift = s;
edgekeys = e;
slider = sl;
indication = i;
}
/** Write the parsed key into [ks] at [index]. Doesn't write if the
attribute is not present. Return flags that can be aggregated into the
value for [keysflags]. */
static int parse_key_attr(XmlPullParser parser, String attr, KeyValue[] ks,
int index)
throws Exception
{
String name = parser.getAttributeValue(null, attr);
int flags = 0;
if (name == null)
return 0;
String name_loc = stripPrefix(name, "loc ");
if (name_loc != null)
{
flags |= F_LOC;
name = name_loc;
}
ks[index] = KeyValue.getKeyByName(name);
return (flags << index);
}
static String stripPrefix(String s, String prefix)
{
return s.startsWith(prefix) ? s.substring(prefix.length()) : null;
}
public static Key parse(XmlPullParser parser) throws Exception
{
Corner k0 = Corner.parse_of_attr(parser, "key0");
Corner k1 = Corner.parse_of_attr(parser, "key1");
Corner k2 = Corner.parse_of_attr(parser, "key2");
Corner k3 = Corner.parse_of_attr(parser, "key3");
Corner k4 = Corner.parse_of_attr(parser, "key4");
KeyValue[] ks = new KeyValue[9];
int keysflags = 0;
keysflags |= parse_key_attr(parser, "key0", ks, 0);
keysflags |= parse_key_attr(parser, "key1", ks, 1);
keysflags |= parse_key_attr(parser, "key2", ks, 2);
keysflags |= parse_key_attr(parser, "key3", ks, 3);
keysflags |= parse_key_attr(parser, "key4", ks, 4);
keysflags |= parse_key_attr(parser, "key5", ks, 5);
keysflags |= parse_key_attr(parser, "key6", ks, 6);
keysflags |= parse_key_attr(parser, "key7", ks, 7);
keysflags |= parse_key_attr(parser, "key8", ks, 8);
float width = attribute_float(parser, "width", 1f);
float shift = attribute_float(parser, "shift", 0.f);
boolean edgekeys = attribute_bool(parser, "edgekeys", false);
boolean slider = attribute_bool(parser, "slider", false);
String indication = parser.getAttributeValue(null, "indication");
while (parser.next() != XmlPullParser.END_TAG)
continue ;
return new Key(k0, k1, k2, k3, k4, width, shift, edgekeys, indication);
continue;
return new Key(ks, keysflags, width, shift, slider, indication);
}
/** Whether key at [index] as [flag]. */
public boolean keyHasFlag(int index, int flag)
{
return (keysflags & (flag << index)) != 0;
}
/** New key with the width multiplied by 's'. */
public Key scaleWidth(float s)
{
return new Key(key0, key1, key2, key3, key4, width * s, shift, edgekeys,
indication);
return new Key(keys, keysflags, width * s, shift, slider, indication);
}
public void getKeys(Set<KeyValue> dst)
{
for (int i = 0; i < keys.length; i++)
if (keys[i] != null)
dst.add(keys[i]);
}
public KeyValue getKeyValue(int i)
{
Corner c;
switch (i)
{
case 0: c = key0; break;
case 1: c = key1; break;
case 2: c = key2; break;
case 3: c = key3; break;
case 4: c = key4; break;
default: c = null; break;
}
return (c == null) ? null : c.kv;
return keys[i];
}
public Key withKeyValue(int i, KeyValue kv)
{
Corner k0 = key0, k1 = key1, k2 = key2, k3 = key3, k4 = key4;
Corner k = Corner.of_kv(kv);
switch (i)
{
case 0: k0 = k; break;
case 1: k1 = k; break;
case 2: k2 = k; break;
case 3: k3 = k; break;
case 4: k4 = k; break;
}
return new Key(k0, k1, k2, k3, k4, width, shift, edgekeys, indication);
KeyValue[] ks = Arrays.copyOf(keys, keys.length);
ks[i] = kv;
int flags = (keysflags & ~(ALL_FLAGS << i));
return new Key(ks, flags, width, shift, slider, indication);
}
public Key withShift(float s)
{
return new Key(key0, key1, key2, key3, key4, width, s, edgekeys, indication);
}
/**
* See Pointers.onTouchMove() for the represented direction.
*/
public KeyValue getAtDirection(int direction)
{
Corner c = null;
if (edgekeys)
{
// \ 1 /
// \ /
// 3 0 2
// / \
// / 4 \
switch (direction)
{
case 2: case 3: c = key1; break;
case 4: case 5: c = key2; break;
case 6: case 7: c = key4; break;
case 8: case 1: c = key3; break;
}
}
else
{
// 1 | 2
// |
// --0--
// |
// 3 | 4
switch (direction)
{
case 1: case 2: c = key1; break;
case 3: case 4: c = key2; break;
case 5: case 6: c = key4; break;
case 7: case 8: c = key3; break;
}
}
return (c == null) ? null : c.kv;
return new Key(keys, keysflags, width, s, slider, indication);
}
public boolean hasValue(KeyValue kv)
{
return (hasValue(key0, kv) || hasValue(key1, kv) || hasValue(key2, kv) ||
hasValue(key3, kv) || hasValue(key4, kv));
}
private static boolean hasValue(Corner c, KeyValue kv)
{
return (c != null && c.kv.equals(kv));
}
}
public static final class Corner
{
public final KeyValue kv;
/** Whether the kv is marked with the "loc " prefix. To be removed if not
specified in the [extra_keys]. */
public final boolean localized;
protected Corner(KeyValue k, boolean l)
{
kv = k;
localized = l;
}
public static Corner parse_of_attr(XmlPullParser parser, String attr) throws Exception
{
String name = parser.getAttributeValue(null, attr);
boolean localized = false;
if (name == null)
return null;
String name_loc = stripPrefix(name, "loc ");
if (name_loc != null)
{
localized = true;
name = name_loc;
}
return new Corner(KeyValue.getKeyByName(name), localized);
}
public static Corner of_kv(KeyValue kv)
{
return new Corner(kv, false);
}
private static String stripPrefix(String s, String prefix)
{
if (s.startsWith(prefix))
return s.substring(prefix.length());
else
return null;
for (int i = 0; i < keys.length; i++)
if (keys[i] != null && keys[i].equals(kv))
return true;
return false;
}
}
@@ -462,22 +407,11 @@ class KeyboardData
public Key apply(Key k)
{
return new Key(apply_key0(k.key0), apply(k.key1), apply(k.key2),
apply(k.key3), apply(k.key4), k.width, k.shift, k.edgekeys,
k.indication);
}
protected Corner apply_key0(Corner c)
{
return apply(c);
}
protected Corner apply(Corner c)
{
if (c == null)
return null;
KeyValue kv = apply(c.kv, c.localized);
return (kv == null) ? null : new Corner(kv, c.localized);
KeyValue[] ks = new KeyValue[k.keys.length];
for (int i = 0; i < ks.length; i++)
if (k.keys[i] != null)
ks[i] = apply(k.keys[i], k.keyHasFlag(i, Key.F_LOC));
return new Key(ks, k.keysflags, k.width, k.shift, k.slider, k.indication);
}
}

View File

@@ -0,0 +1,55 @@
package juloo.keyboard2;
import android.app.Activity;
import android.content.Intent;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.provider.Settings;
import android.view.KeyEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class LauncherActivity extends Activity
{
/** Text is replaced when receiving key events. */
TextView _tryhere_text;
EditText _tryhere_area;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.launcher_activity);
_tryhere_text = (TextView)findViewById(R.id.launcher_tryhere_text);
_tryhere_area = (EditText)findViewById(R.id.launcher_tryhere_area);
if (VERSION.SDK_INT > 28)
_tryhere_area.addOnUnhandledKeyEventListener(
this.new Tryhere_OnUnhandledKeyEventListener());
}
public void launch_imesettings(View _btn)
{
startActivity(new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS));
}
final class Tryhere_OnUnhandledKeyEventListener implements View.OnUnhandledKeyEventListener
{
public boolean onUnhandledKeyEvent(View v, KeyEvent ev)
{
// Key release of modifiers would erase interesting data
if (KeyEvent.isModifierKey(ev.getKeyCode()))
return false;
StringBuilder s = new StringBuilder();
if (ev.isAltPressed()) s.append("Alt+");
if (ev.isShiftPressed()) s.append("Shift+");
if (ev.isCtrlPressed()) s.append("Ctrl+");
if (ev.isMetaPressed()) s.append("Meta+");
// s.append(ev.getDisplayLabel());
String kc = KeyEvent.keyCodeToString(ev.getKeyCode());
s.append(kc.replaceFirst("^KEYCODE_", ""));
_tryhere_text.setText(s.toString());
return true;
}
}
}

View File

@@ -76,12 +76,20 @@ public final class Pointers implements Handler.Callback
return -1;
}
public int getKeyFlags(KeyboardData.Key key, KeyValue kv)
{
Pointer ptr = getLatched(key, kv);
if (ptr == null) return -1;
return ptr.flags;
}
/** Fake pointers are latched and not lockable. */
public void add_fake_pointer(KeyValue kv, KeyboardData.Key key, boolean locked)
{
if (getLatched(key, kv) != null)
return; // Already latched, don't add an other pointer.
Pointer ptr = new Pointer(-1, key, kv, 0.f, 0.f, Modifiers.EMPTY);
Pointer ptr = getLatched(key, kv);
if (ptr != null)
removePtr(ptr); // Already latched, replace pointer.
ptr = new Pointer(-1, key, kv, 0.f, 0.f, Modifiers.EMPTY);
ptr.flags &= ~(KeyValue.FLAG_LATCH | KeyValue.FLAG_LOCK);
ptr.flags |= KeyValue.FLAG_FAKE_PTR;
if (locked)
@@ -103,6 +111,12 @@ public final class Pointers implements Handler.Callback
Pointer ptr = getPtr(pointerId);
if (ptr == null)
return;
if (ptr.sliding)
{
clearLatched();
onTouchUp_sliding(ptr);
return;
}
stopKeyRepeat(ptr);
Pointer latched = getLatched(ptr);
if (latched != null) // Already latched
@@ -147,53 +161,59 @@ public final class Pointers implements Handler.Callback
public void onTouchDown(float x, float y, int pointerId, KeyboardData.Key key)
{
// Ignore new presses while a modulated key is active. On some devices,
// ghost touch events can happen while the pointer travels on top of other
// keys.
if (isModulatedKeyPressed())
// Ignore new presses while a sliding key is active. On some devices, ghost
// touch events can happen while the pointer travels on top of other keys.
if (isSliding())
return;
// Don't take latched modifiers into account if an other key is pressed.
// The other key already "own" the latched modifiers and will clear them.
Modifiers mods = getModifiers(isOtherPointerDown());
KeyValue value = handleKV(key.key0, mods);
KeyValue value = _handler.modifyKey(key.keys[0], mods);
Pointer ptr = new Pointer(pointerId, key, value, x, y, mods);
_ptrs.add(ptr);
startKeyRepeat(ptr);
_handler.onPointerDown(false);
}
static final int[] DIRECTION_TO_INDEX = new int[]{
7, 2, 2, 6, 6, 4, 4, 8, 8, 3, 3, 5, 5, 1, 1, 7
};
/**
* [direction] is an int between [0] and [15] that represent 16 sections of a
* circle, clockwise, starting at the top.
*/
KeyValue getKeyAtDirection(KeyboardData.Key k, int direction)
{
return k.keys[DIRECTION_TO_INDEX[direction]];
}
/*
* Get the KeyValue at the given direction. In case of swipe (!= 0), get the
* nearest KeyValue that is not key0.
* Get the KeyValue at the given direction. In case of swipe (direction !=
* null), get the nearest KeyValue that is not key0.
* Take care of applying [_handler.onPointerSwipe] to the selected key, this
* must be done at the same time to be sure to treat removed keys correctly.
* Return [null] if no key could be found in the given direction or if the
* selected key didn't change.
*/
private KeyValue getKeyAtDirection(Pointer ptr, int direction)
private KeyValue getNearestKeyAtDirection(Pointer ptr, Integer direction)
{
if (direction == 0)
return handleKV(ptr.key.key0, ptr.modifiers);
if (direction == null)
return _handler.modifyKey(ptr.key.keys[0], ptr.modifiers);
KeyValue k;
for (int i = 0; i > -3; i = (~i>>31) - i)
// [i] is [0, -1, 1, -2, 2, ...]
for (int i = 0; i > -4; i = (~i>>31) - i)
{
int d = (direction + i + 8 - 1) % 8 + 1;
int d = (direction + i + 16) % 16;
// Don't make the difference between a key that doesn't exist and a key
// that is removed by [_handler]. Triggers side effects.
k = _handler.modifyKey(ptr.key.getAtDirection(d), ptr.modifiers);
k = _handler.modifyKey(getKeyAtDirection(ptr.key, d), ptr.modifiers);
if (k != null)
return k;
}
return null;
}
private KeyValue handleKV(KeyboardData.Corner c, Modifiers modifiers)
{
if (c == null)
return null;
return _handler.modifyKey(c.kv, modifiers);
}
public void onTouchMove(float x, float y, int pointerId)
{
Pointer ptr = getPtr(pointerId);
@@ -203,45 +223,45 @@ public final class Pointers implements Handler.Callback
// The position in a IME windows is clampled to view.
// For a better up swipe behaviour, set the y position to a negative value when clamped.
if (y == 0.0) y = -400;
float dx = x - ptr.downX;
float dy = y - ptr.downY;
float dist = Math.abs(dx) + Math.abs(dy);
ptr.ptrDist = dist;
int direction;
if (ptr.sliding)
{
onTouchMove_sliding(ptr, dx);
return;
}
float dist = Math.abs(dx) + Math.abs(dy);
Integer direction;
if (dist < _config.swipe_dist_px)
{
direction = 0;
direction = null;
}
else
{
// One of the 8 directions:
// |\2|3/|
// |1\|/4|
// |-----|
// |8/|\5|
// |/7|6\|
direction = 1;
if (dx > 0) direction += 2;
if (dx > Math.abs(dy) || (dx < 0 && dx > -Math.abs(dy))) direction += 1;
if (dy > 0) direction = 9 - direction;
// See [getKeyAtDirection()] for the meaning. The starting point on the
// circle is the top direction.
double a = Math.atan2(dy, dx) + Math.PI;
// a is between 0 and 2pi, 0 is pointing to the left
// add 12 to align 0 to the top
direction = ((int)(a * 8 / Math.PI) + 12) % 16;
}
if (direction != ptr.selected_direction)
{
ptr.selected_direction = direction;
KeyValue newValue = getKeyAtDirection(ptr, direction);
if (newValue != null && (ptr.value == null || !newValue.equals(ptr.value)))
KeyValue newValue = getNearestKeyAtDirection(ptr, direction);
if (newValue != null && !newValue.equals(ptr.value))
{
int old_flags = ptr.flags;
ptr.value = newValue;
ptr.flags = newValue.getFlags();
// Keep the keyrepeat going between modulated keys.
if ((old_flags & ptr.flags & KeyValue.FLAG_PRECISE_REPEAT) == 0)
// Sliding mode is entered when key5 or key6 is down on a slider key.
if (ptr.key.slider &&
(newValue.equals(ptr.key.getKeyValue(5))
|| newValue.equals(ptr.key.getKeyValue(6))))
{
stopKeyRepeat(ptr);
startKeyRepeat(ptr);
startSliding(ptr, dy);
}
_handler.onPointerDown(true);
}
@@ -299,13 +319,11 @@ public final class Pointers implements Handler.Callback
_handler.onPointerFlagsChanged(shouldVibrate);
}
private boolean isModulatedKeyPressed()
boolean isSliding()
{
for (Pointer ptr : _ptrs)
{
if ((ptr.flags & KeyValue.FLAG_PRECISE_REPEAT) != 0)
if (ptr.sliding)
return true;
}
return false;
}
@@ -320,7 +338,8 @@ public final class Pointers implements Handler.Callback
if (ptr.timeoutWhat == msg.what)
{
if (handleKeyRepeat(ptr))
_keyrepeat_handler.sendEmptyMessageDelayed(msg.what, nextRepeatInterval(ptr));
_keyrepeat_handler.sendEmptyMessageDelayed(msg.what,
_config.longPressInterval);
else
ptr.timeoutWhat = -1;
return true;
@@ -329,30 +348,13 @@ public final class Pointers implements Handler.Callback
return false;
}
private long nextRepeatInterval(Pointer ptr)
{
long t = _config.longPressInterval;
if (_config.preciseRepeat && (ptr.flags & KeyValue.FLAG_PRECISE_REPEAT) != 0)
{
// Modulate repeat interval depending on the distance of the pointer
t = (long)((float)t * 2.f / modulatePreciseRepeat(ptr));
}
return t;
}
private static int uniqueTimeoutWhat = 0;
private void startKeyRepeat(Pointer ptr)
{
if (ptr.value == null)
return;
int what = (uniqueTimeoutWhat++);
ptr.timeoutWhat = what;
long timeout = _config.longPressTimeout;
// Faster repeat timeout for modulated keys
if ((ptr.flags & KeyValue.FLAG_PRECISE_REPEAT) != 0)
timeout /= 2;
_keyrepeat_handler.sendEmptyMessageDelayed(what, timeout);
_keyrepeat_handler.sendEmptyMessageDelayed(what, _config.longPressTimeout);
}
private void stopKeyRepeat(Pointer ptr)
@@ -361,7 +363,6 @@ public final class Pointers implements Handler.Callback
{
_keyrepeat_handler.removeMessages(ptr.timeoutWhat);
ptr.timeoutWhat = -1;
ptr.repeatingPtrDist = -1.f;
}
}
@@ -374,22 +375,54 @@ public final class Pointers implements Handler.Callback
lockPointer(ptr, true);
return false;
}
// Stop repeating: Latched key, special keys
if (ptr.pointerId == -1 || (ptr.flags & KeyValue.FLAG_SPECIAL) != 0)
// Stop repeating: Latched key, no key
if (ptr.pointerId == -1 || ptr.value == null)
return false;
_handler.onPointerHold(ptr.value, ptr.modifiers);
KeyValue kv = KeyModifier.modify_long_press(ptr.value);
if (!kv.equals(ptr.value))
{
ptr.value = kv;
ptr.flags = kv.getFlags();
_handler.onPointerDown(true);
return true;
}
// Stop repeating: Special keys
if (kv.hasFlags(KeyValue.FLAG_SPECIAL))
return false;
_handler.onPointerHold(kv, ptr.modifiers);
return true;
}
private float modulatePreciseRepeat(Pointer ptr)
// Sliding
void startSliding(Pointer ptr, float initial_dy)
{
if (ptr.repeatingPtrDist < 0.f)
ptr.repeatingPtrDist = ptr.ptrDist; // First repeat
if (ptr.ptrDist > ptr.repeatingPtrDist * 2.f)
ptr.repeatingPtrDist = ptr.ptrDist / 2.f; // Large swipe, move the middle point
float left = ptr.repeatingPtrDist / 2.f;
float accel = (ptr.ptrDist - left) / (ptr.repeatingPtrDist - left);
return Math.min(8.f, Math.max(0.1f, accel));
stopKeyRepeat(ptr);
ptr.sliding = true;
ptr.sliding_count = (int)(initial_dy / _config.slide_step_px);
}
/** Handle a sliding pointer going up. Latched modifiers are not cleared to
allow easy adjustments to the cursors. The pointer is cancelled. */
void onTouchUp_sliding(Pointer ptr)
{
removePtr(ptr);
_handler.onPointerFlagsChanged(false);
}
/** Handle move events for sliding pointers. [dx] is distance travelled from
[downX]. */
void onTouchMove_sliding(Pointer ptr, float dx)
{
int count = (int)(dx / _config.slide_step_px);
if (count == ptr.sliding_count)
return;
int key_index = (count < ptr.sliding_count) ? 5 : 6;
KeyValue newValue = _handler.modifyKey(ptr.key.keys[key_index], ptr.modifiers);
ptr.sliding_count = count;
ptr.value = newValue;
if (newValue != null)
_handler.onPointerHold(newValue, ptr.modifiers);
}
private static final class Pointer
@@ -398,36 +431,36 @@ public final class Pointers implements Handler.Callback
public int pointerId;
/** The Key pressed by this Pointer */
public final KeyboardData.Key key;
/** Current direction. */
public int selected_direction;
/** Current direction. [null] means not swiping. */
public Integer selected_direction;
/** Selected value with [modifiers] applied. */
public KeyValue value;
public float downX;
public float downY;
/** Distance of the pointer to the initial press. */
public float ptrDist;
/** Modifier flags at the time the key was pressed. */
public Modifiers modifiers;
/** Flags of the value. Latch, lock and locked flags are updated. */
public int flags;
/** Identify timeout messages. */
public int timeoutWhat;
/** ptrDist at the first repeat, -1 otherwise. */
public float repeatingPtrDist;
/** Whether the pointer is "sliding" laterally on a key. */
public boolean sliding;
/** Number of event already caused by sliding. */
public int sliding_count;
public Pointer(int p, KeyboardData.Key k, KeyValue v, float x, float y, Modifiers m)
{
pointerId = p;
key = k;
selected_direction = 0;
selected_direction = null;
value = v;
downX = x;
downY = y;
ptrDist = 0.f;
modifiers = m;
flags = (v == null) ? 0 : v.getFlags();
timeoutWhat = -1;
repeatingPtrDist = -1.f;
sliding = false;
sliding_count = 0;
}
}

1
srcs/special_font/60.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-20 0 1168 2048"><path fill="currentColor" d="m931.256 1557.78-69.314-69.314Q749.47 1574.78 612.15 1586.55v99.395q176.555-11.772 319.106-128.166zm-414.577 28.77q-133.396-10.462-249.792-100.701 0 1.309-71.93 74.545l2.616-2.615q142.554 116.396 319.106 128.166zm-319.107-171.321q-90.24-103.316-107.24-245.867H-9.062q17.002 181.786 137.32 319.104l-6.539 5.23 3.923-2.614 41.85-43.158q30.08-31.387 30.08-32.695zm940.318-245.868h-99.394q-17 141.242-107.239 248.483l69.314 70.62q120.318-137.318 137.319-319.103zm0-96.778q-14.386-189.633-129.474-326.953l-69.314 70.622q86.316 111.164 99.394 256.33zM189.726 818.867h.001q-86.315 107.239-99.394 253.716H-9.06Q4.017 882.95 119.104 745.63l-3.923-3.924q-1.308 0 74.545 77.16zm749.377-142.552Q792.627 552.073 612.151 540.3v99.394q139.935 11.77 257.639 105.935zM516.679 540.303q-180.478 11.77-326.953 136.013l69.314 69.314q117.703-90.238 257.64-105.933v-99.394zM648 1838H430v201h218z"/></svg>

After

Width:  |  Height:  |  Size: 976 B

1
srcs/special_font/61.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1168 2048"><path d="m931.256 1839.834-69.314-69.314q-112.472 86.315-249.792 98.086V1968q176.555-11.771 319.106-128.166zm-414.577 28.77q-133.396-10.462-249.792-100.7 0 1.308-71.93 74.544l2.616-2.615q142.554 116.396 319.106 128.166v-99.395zm-319.107-171.32q-90.24-103.317-107.24-245.868H-9.062q17.001 181.786 137.32 319.104l-6.539 5.232 3.923-2.616 41.85-43.158q30.08-31.387 30.08-32.695zm940.318-245.869h-99.394q-17 141.242-107.239 248.483l69.314 70.621q120.318-137.319 137.319-319.104zm0-96.778q-14.386-189.633-129.474-326.953l-69.314 70.622q86.316 111.164 99.394 256.331h99.394zm-948.164-253.716h.001q-86.315 107.24-99.394 253.716H-9.06q13.078-189.633 128.165-326.953l-3.923-3.924q-1.308 0 74.545 77.161zM939.103 958.37Q792.627 834.127 612.151 822.355v99.395q139.935 11.77 257.639 105.934ZM516.679 822.357Q336.201 834.128 189.726 958.37l69.314 69.314q117.703-90.238 257.64-105.933v-99.394zM792 831.054q70-52 109.5-99.5t39.5-101.5q0-42-22.5-66t-73.5-24q-27 0-50 7.5t-49 18.5l-33-123q36-19 79.5-31.5t103.5-12.5q95 0 155.5 55t60.5 154q0 80-60.5 152t-187.5 128Z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

1
srcs/special_font/62.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-20 0 1168 2048"><path fill="currentColor" d="m931.256 1851.834-69.314-69.314q-112.472 86.315-249.792 98.086V1980q176.555-11.771 319.106-128.166zm-414.577 28.77q-133.396-10.462-249.792-100.7 0 1.308-71.93 74.544l2.616-2.615q142.554 116.396 319.106 128.166v-99.395zm-319.107-171.32q-90.24-103.317-107.24-245.868H-9.062q17.001 181.786 137.32 319.104l-6.539 5.232 3.923-2.616 41.85-43.158q30.08-31.387 30.08-32.695zm940.318-245.869h-99.394q-17 141.242-107.239 248.483l69.314 70.621q120.318-137.319 137.319-319.104zm0-96.778q-14.386-189.633-129.474-326.953l-69.314 70.622q86.316 111.164 99.394 256.331h99.394zm-948.164-253.716h.001q-86.315 107.24-99.394 253.716H-9.06q13.078-189.633 128.165-326.953l-3.923-3.924q-1.308 0 74.545 77.161zM939.103 970.37Q792.627 846.127 612.151 834.355v99.395q139.935 11.77 257.639 105.934ZM516.679 834.357Q336.201 846.128 189.726 970.37l69.314 69.314q117.703-90.238 257.64-105.933v-99.394zM623 840.054l-12-52q65-11 108-52t43-121q0-96-79-153t-226-57l-7 109q72 0 116 24.5t44 73.5q0 48-36 67t-123 26l32 135z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

View File

@@ -9,27 +9,24 @@ import glob
# The baseline is 'values/strings.xml', which is english.
def parse_strings_file(file):
resources = ET.parse(file).getroot()
return [
((ent.get("name"), ent.get("product")), ent.text)
for ent in resources if ent.tag == "string"
]
def key(ent): return ent.get("name"), ent.get("product")
resrcs = ET.parse(file).getroot()
return { key(ent): ent for ent in resrcs if ent.tag == "string" }
def string_entry_str(name, text, product):
product_attr = ' product="%s"' % product if product != None else ""
text_encoded = saxutils.escape(text)
return '<string name="%s"%s>%s</string>' % (name, product_attr, text_encoded)
def dump_entry(out, entry, comment):
out.write(" ")
if comment: out.write("<!-- ")
out.write(ET.tostring(entry, "unicode").strip())
if comment: out.write(" -->")
out.write("\n")
def write_updated_strings(out, baseline, strings):
out.write('<?xml version="1.0" encoding="utf-8"?>\n<resources>\n')
for key, default_text in baseline:
name, product = key
for key, baseline_entry in baseline.items():
if key in strings:
ent = string_entry_str(name, strings[key], product)
out.write(" %s\n" % ent)
dump_entry(out, strings[key], False)
else:
def_ent = string_entry_str(name, default_text, product)
out.write(" <!-- %s -->\n" % def_ent)
dump_entry(out, baseline_entry, True)
out.write('</resources>\n')
baseline = parse_strings_file("res/values/strings.xml")