Compare commits

...

17 Commits

Author SHA1 Message Date
Jules Aguillon
de5571d428 Release 1.20.2 (31) 2023-01-15 23:34:04 +01:00
Jules Aguillon
6126578111 Avoid switching back from secondary layout automatically
Stay on the secondary layout after a config refresh or onStartInputView.
The information is kept until the keyboard is restarted.

Additionally, move tweaking the secondary layout to the Config class now
that physical equality is not needed.
2023-01-15 23:19:09 +01:00
Jules Aguillon
046416389a Present the "keyboard height" option similarly to the margin options 2023-01-15 19:37:03 +01:00
Jules Aguillon
fd0f0d5476 Separate option for bottom margin in landscape mode
A large margin in portrait mode is desirable but generally not in
landscape mode.
2023-01-15 19:19:07 +01:00
Jules Aguillon
a199962117 Separate option for horizontal margin in landscape mode
A separate option is needed, the +25dp offset wasn't enough.
2023-01-15 19:11:08 +01:00
Maki Nishikino
8a3c0566e7 Update Russian translation and add Russain description (#279)
* Add ru-RU market description

* Add russian settings translate
2023-01-15 17:20:04 +01:00
Jules Aguillon
e190394b47 Add layout 'qwertz_sk'
Co-authored-by: Jozef Kundlak <ingjozefkundlak@gmail.com>
2023-01-14 23:31:37 +01:00
Jules Aguillon
dcc4a640f7 Remove borders on the black theme 2023-01-07 14:55:43 +01:00
Jules Aguillon
c5f5a23d75 Fix dimensions going off after rotation
Values like 'characterSize' and 'horizontalMargin' can't be fed back into the default value because they are not of the same unit.
To avoid this happening again, change the way the default value is defined for every options.
The 'key_height' dimension was no longer used.
2022-12-31 14:00:38 +01:00
Jules Aguillon
73ef7c6765 Improve the description of the app
"swipe gesture" is not clearly defined and can be confused with the
one from the Swype keyboard. Also remove the useless part that is
repeated below.
2022-12-31 13:47:38 +01:00
Jules Aguillon
e333eb06fd Add keys for every context menu actions
The most requested keys are undo and redo. Unfortunatly redo doesn't
work reliably.

The other context menu actions like share, assist and autofill are added
even thought they are rarely useful or implemented.
2022-12-30 15:29:18 +01:00
Jules Aguillon
764cd882d2 Fix inaccessible text layout from pin
The "main" layout can now be pin layout. 'SWITCH_TEXT' and
'SWITCH_SECOND_BACK' don't mean to use that.
2022-12-29 12:43:02 +01:00
Jules Aguillon
a891a3a99b Release 1.20.1 2022-12-14 15:36:04 +01:00
Jules Aguillon
8f972113ca Fix pin entry layout not showing up
The regular text layout was showing instead of the pin entry due to a
misuse of the 'switch' syntax.
2022-12-14 15:33:44 +01:00
Jules Aguillon
c61b31168c Fix a crash on API < 12
'extra_keys_subtype' can be none on API level < 12 when the "accents"
option is tweaked.
2022-12-14 15:09:46 +01:00
Chasm Solacer
c182f3d829 qwerty_pl layout is default for Polish language (#253) 2022-12-14 15:07:40 +01:00
Jules Aguillon
7d6306fbc9 Fix keyboard not showing up after rotation
'setInputView()' must be called on every 'onStartInputView()', not just
when the view is re-created.

This is broken since bf31872.
2022-12-14 15:04:11 +01:00
35 changed files with 318 additions and 156 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="juloo.keyboard2" android:versionCode="29" android:versionName="1.20.0" android:hardwareAccelerated="false"> <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"/> <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="31"/>
<application android:label="@string/app_name" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:hardwareAccelerated="false"> <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"> <service android:name="juloo.keyboard2.Keyboard2" android:label="@string/app_name" android:permission="android.permission.BIND_INPUT_METHOD" android:exported="true" android:directBootAware="true">

View File

@@ -5,15 +5,13 @@ A lightweight virtual keyboard for developers.
| --- | --- | --- | | --- | --- | --- |
| <img src="/metadata/android/en-US/images/phoneScreenshots/4.png" alt="Screenshot-4" /> | <img src="/metadata/android/en-US/images/phoneScreenshots/5.png" alt="Screenshot-5" /> | <img src="/metadata/android/en-US/images/phoneScreenshots/6.png" alt="Screenshot-6" /> | | <img src="/metadata/android/en-US/images/phoneScreenshots/4.png" alt="Screenshot-4" /> | <img src="/metadata/android/en-US/images/phoneScreenshots/5.png" alt="Screenshot-5" /> | <img src="/metadata/android/en-US/images/phoneScreenshots/6.png" alt="Screenshot-6" /> |
This app is a virtual keyboard for Android. The main features are easy typing of every ASCII character using the swipe gesture, dead keys for accents and modifier keys and the presence of special keys (tab, esc, arrows, etc..). The main feature is easy typing of more characters by swiping the keys toward the corners.
The keyboard shows up to 4 extra characters in the corners of each key. These extra characters are hit by swiping the finger on the key.
Highlight of some of the features: Highlight of some of the features:
- Every character and special keys that are also available on a PC keyboard. This is perfect for using applications like Termux. - Every character and special keys of a PC keyboard. This is perfect for using applications like Termux.
- This includes Tab, Esc, the arrows and function keys, but also Ctrl and Alt ! - This includes Tab, Esc, the arrows and function keys, but also Ctrl and Alt.
- Accented keys are accessible using dead keys. First activate the accent, then type the accented letter. - Accented keys are accessible using dead keys. First activate the accent, then type the accented letter.

View File

@@ -0,0 +1 @@
Bug fix release.

View File

@@ -0,0 +1,7 @@
New layouts: QWERTZ (Slovak)
Bugs fixed.
Updated translations.
Tweaked themes and settings.
Thanks to the contributors: Jozef Kundlak, @MAKI1LOVE

View File

@@ -1,12 +1,10 @@
This app is a virtual keyboard for Android. The main features are easy typing of every ASCII character using the swipe gesture, dead keys for accents and modifier keys and the presence of special keys (tab, esc, arrows, etc..). The main feature is easy typing of more characters by swiping the keys toward the corners.
The keyboard shows up to 4 extra characters in the corners of each key. These extra characters are hit by swiping the finger on the key.
Highlight of some of the features: Highlight of some of the features:
- Every character and special keys that are also available on a PC keyboard. This is perfect for using applications like Termux. - Every character and special keys of a PC keyboard. This is perfect for using applications like Termux.
- This includes Tab, Esc, the arrows and function keys, but also Ctrl and Alt ! - This includes Tab, Esc, the arrows and function keys, but also Ctrl and Alt.
- Accented keys are accessible using dead keys. First activate the accent, then type the accented letter. - Accented keys are accessible using dead keys. First activate the accent, then type the accented letter.

View File

@@ -1,12 +1,10 @@
Cette application est un clavier virtuel pour Android. Les fonctionnalités principales sont l'accès rapide à tous les caractères ASCII en glissant le doigt, les touches mortes pour les accents et la présence des touches spéciales (Tab, Esc, les flèches, etc..). La fonctionnalité principale est l'accès rapide à plus de caractères en balayant les touches vers les coins.
Il peut y avoir un caractère supplémentaire dans chaque coin de chaque touche. Ces caractères sont tapés en glissant le doigt sur la touche.
Quelques fonctionnalités: Quelques fonctionnalités:
- Tous les caractères et toutes les touches spéciales d'un clavier PC. Idéal pour utiliser une application comme Termux. - Tous les caractères et toutes les touches spéciales d'un clavier PC. Idéal pour utiliser une application comme Termux.
- Cela comprend les touches Tab, Esc, les flèches et les touches fonctions mais aussi Ctrl et Alt ! - Cela comprend les touches Tab, Esc, les flèches et les touches fonctions mais aussi Ctrl et Alt.
- Les accents sont des touches mortes. Activez d'abord l'accent et tapez ensuite la lettre accentuée. - Les accents sont des touches mortes. Activez d'abord l'accent et tapez ensuite la lettre accentuée.

View File

@@ -0,0 +1,16 @@
Главная особенность клавиатуры - это возможность легко напечатать любой ASCII символ за счет свайпов в углы клавиш.
Основные особенности:
- Есть все символы и специальные клавиши компьютерной клавиатуры. Идеально подходит для таких приложений, как Termux.
- Включены клавиши Tab, Esc, стрелки, функциональные клавиши, Ctrl и Alt.
- Клавиши с акцентами доступны с помощью мёртвых клавиш. Сначала нажмите на акцент, затем нажмите на букву с акцентом.
- Очень легкая и быстрая. Использует в 500 раз меньше места, чем Google клавиатура и в 15 раз меньше дефолтной клавиатуры. Никакой рекламы, никаких трекеров.
- Множество раскладок: QWERTY, QWERTZ, AZERTY и т.д. Темы: белая, темная. Множество других опций.
Клавиатура, как и все виртуальные клавиатуры, должна быть активирована в настройках. Откройте Настройки и перейдите:
Язык и ввод > Блок "Клавиатура" или "Способ ввода" > поставить галочку напротив Unexpected Keyboard

View File

@@ -0,0 +1 @@
Легкая виртуальная клавиатура для разработчиков.

View File

@@ -0,0 +1 @@
Unexpected Keyboard

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Klávesnice Unexpected (pro ladění)</string> <string name="app_name" product="debug">Klávesnice Unexpected (pro ladění)</string>
<string name="app_name" product="default">Klávesnice Unexpected</string> <string name="app_name" product="default">Klávesnice Unexpected</string>
<string name="settings_activity_label">Nastavení Klávesnice Unexpected</string> <string name="settings_activity_label">Nastavení Klávesnice Unexpected</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_category_layout">Rozvržení</string> <string name="pref_category_layout">Rozvržení</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Styl</string> <string name="pref_category_style">Styl</string>
<string name="pref_margin_bottom_title">Spodní odsazení</string> <string name="pref_margin_bottom_title">Spodní odsazení</string>
<string name="pref_keyboard_height_title">Výška klávesnice</string> <string name="pref_keyboard_height_title">Výška klávesnice</string>
<string name="pref_keyboard_height_landscape_title">Výška klávesnice v režimu na šířku</string>
<string name="pref_horizontal_margin_title">Boční odsazení</string> <string name="pref_horizontal_margin_title">Boční odsazení</string>
<string name="pref_character_size_title">Velikost znaků</string> <string name="pref_character_size_title">Velikost znaků</string>
<string name="pref_character_size_summary">Velikost znaků zobrazených na klávesnici (%.2fx)</string> <string name="pref_character_size_summary">Velikost znaků zobrazených na klávesnici (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (Debug)</string> <string name="app_name" product="debug">Unexpected Keyboard (Debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string> <string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Unexpected Keyboard - Einstellungen</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_category_layout">Layout</string> <string name="pref_category_layout">Layout</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Design</string> <string name="pref_category_style">Design</string>
<string name="pref_margin_bottom_title">Unterer Abstand</string> <string name="pref_margin_bottom_title">Unterer Abstand</string>
<string name="pref_keyboard_height_title">Höhe der Tastatur</string> <string name="pref_keyboard_height_title">Höhe der Tastatur</string>
<string name="pref_keyboard_height_landscape_title">Höhe der Tastatur im Querformat</string>
<string name="pref_horizontal_margin_title">Horizontaler Abstand</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_title">Größe der Beschriftung</string>
<string name="pref_character_size_summary">Größe der Buchstaben auf den Tasten (%.2fx)</string> <string name="pref_character_size_summary">Größe der Buchstaben auf den Tasten (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> --> <!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> -->
<!-- <string name="app_name" product="default">Unexpected Keyboard</string> --> <!-- <string name="app_name" product="default">Unexpected Keyboard</string> -->
<string name="settings_activity_label">Ajustes de Unexpected Keyboard</string> <string name="settings_activity_label">Ajustes de Unexpected Keyboard</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_category_layout">Formato</string> <string name="pref_category_layout">Formato</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Estilo</string> <string name="pref_category_style">Estilo</string>
<string name="pref_margin_bottom_title">Margen del pie</string> <string name="pref_margin_bottom_title">Margen del pie</string>
<string name="pref_keyboard_height_title">Altura del teclado</string> <string name="pref_keyboard_height_title">Altura del teclado</string>
<!-- <string name="pref_keyboard_height_landscape_title">Keyboard height in landscape mode</string> -->
<string name="pref_horizontal_margin_title">Margen horizontal</string> <string name="pref_horizontal_margin_title">Margen horizontal</string>
<string name="pref_character_size_title">Tamaño de etiqueta</string> <string name="pref_character_size_title">Tamaño de etiqueta</string>
<string name="pref_character_size_summary">Tamaño de caracteres mostrados en el teclado (%.2fx)</string> <string name="pref_character_size_summary">Tamaño de caracteres mostrados en el teclado (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> --> <!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> -->
<!-- <string name="app_name" product="default">Unexpected Keyboard</string> --> <!-- <string name="app_name" product="default">Unexpected Keyboard</string> -->
<string name="settings_activity_label">Unexpected Keyboard Paramètres</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_category_layout">Disposition</string>
<string name="pref_label_brightness">Luminosité des symboles</string> <string name="pref_label_brightness">Luminosité des symboles</string>
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Style</string> <string name="pref_category_style">Style</string>
<string name="pref_margin_bottom_title">Marge du bas</string> <string name="pref_margin_bottom_title">Marge du bas</string>
<string name="pref_keyboard_height_title">Hauteur du clavier</string> <string name="pref_keyboard_height_title">Hauteur du clavier</string>
<string name="pref_keyboard_height_landscape_title">Hauteur du clavier en mode paysage</string>
<string name="pref_horizontal_margin_title">Marge des côtés</string> <string name="pref_horizontal_margin_title">Marge des côtés</string>
<string name="pref_character_size_title">Taille des symboles</string> <string name="pref_character_size_title">Taille des symboles</string>
<string name="pref_character_size_summary">Taille des caractères affichés sur les touches (%.2fx)</string> <string name="pref_character_size_summary">Taille des caractères affichés sur les touches (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (debug)</string> <string name="app_name" product="debug">Unexpected Keyboard (debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string> <string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Impostazioni di Unexpected Keyboard</string> <string name="settings_activity_label">Impostazioni di Unexpected Keyboard</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_category_layout">Layout</string> <string name="pref_category_layout">Layout</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Stile</string> <string name="pref_category_style">Stile</string>
<string name="pref_margin_bottom_title">Margine inferiore</string> <string name="pref_margin_bottom_title">Margine inferiore</string>
<string name="pref_keyboard_height_title">Altezza tastiera</string> <string name="pref_keyboard_height_title">Altezza tastiera</string>
<string name="pref_keyboard_height_landscape_title">Altezza tastiera in modalità orizzontale</string>
<string name="pref_horizontal_margin_title">Margine orizzontale</string> <string name="pref_horizontal_margin_title">Margine orizzontale</string>
<string name="pref_character_size_title">Dimensione Caratteri</string> <string name="pref_character_size_title">Dimensione Caratteri</string>
<string name="pref_character_size_summary">Dimensione dei caratteri mostrati sulla tastiera (%.2fx)</string> <string name="pref_character_size_summary">Dimensione dei caratteri mostrati sulla tastiera (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> --> <!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> -->
<!-- <string name="app_name" product="default">Unexpected Keyboard</string> --> <!-- <string name="app_name" product="default">Unexpected Keyboard</string> -->
<string name="settings_activity_label">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_category_layout">레이아웃</string> <string name="pref_category_layout">레이아웃</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">스타일</string> <string name="pref_category_style">스타일</string>
<string name="pref_margin_bottom_title">아래 넓이</string> <string name="pref_margin_bottom_title">아래 넓이</string>
<string name="pref_keyboard_height_title">키보드 높이</string> <string name="pref_keyboard_height_title">키보드 높이</string>
<!-- <string name="pref_keyboard_height_landscape_title">Keyboard height in landscape mode</string> -->
<string name="pref_horizontal_margin_title">양 옆 넓이</string> <string name="pref_horizontal_margin_title">양 옆 넓이</string>
<string name="pref_character_size_title">폰트 크기</string> <string name="pref_character_size_title">폰트 크기</string>
<string name="pref_character_size_summary">키보드의 표시되는 폰트 크기 (%.2fx)</string> <string name="pref_character_size_summary">키보드의 표시되는 폰트 크기 (%.2fx)</string>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="horizontal_margin">28dp</dimen>
<dimen name="margin_bottom">3dp</dimen>
<dimen name="emoji_type_button_height">48dp</dimen> <dimen name="emoji_type_button_height">48dp</dimen>
<dimen name="extra_horizontal_margin">25dp</dimen>
</resources> </resources>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (atkļūdošana)</string> <string name="app_name" product="debug">Unexpected Keyboard (atkļūdošana)</string>
<string name="app_name" product="default">Unexpected Keyboard</string> <string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Unexpected Keyboard iestatījumi</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_category_layout">Izkārtojums</string> <string name="pref_category_layout">Izkārtojums</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Izskata pielāgojumi</string> <string name="pref_category_style">Izskata pielāgojumi</string>
<string name="pref_margin_bottom_title">Apakšējā apmale</string> <string name="pref_margin_bottom_title">Apakšējā apmale</string>
<string name="pref_keyboard_height_title">Tastatūras augstums</string> <string name="pref_keyboard_height_title">Tastatūras augstums</string>
<string name="pref_keyboard_height_landscape_title">Tastatūras augstums guleniski</string>
<string name="pref_horizontal_margin_title">Līmeniskā apmale</string> <string name="pref_horizontal_margin_title">Līmeniskā apmale</string>
<string name="pref_character_size_title">Iezīmes izmērs</string> <string name="pref_character_size_title">Iezīmes izmērs</string>
<string name="pref_character_size_summary">Tastatūrā attēloto rakstzīmju izmērs (%.2fx)</string> <string name="pref_character_size_summary">Tastatūrā attēloto rakstzīmju izmērs (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (debug)</string> <string name="app_name" product="debug">Unexpected Keyboard (debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string> <string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Ustawienia 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_category_layout">Układ</string> <string name="pref_category_layout">Układ</string>
<string name="pref_label_brightness">Dostosuj jasność znaków</string> <string name="pref_label_brightness">Dostosuj jasność znaków</string>
<string name="pref_keyboard_opacity">Nieprzezroczystość tła klawiatury</string> <string name="pref_keyboard_opacity">Nieprzezroczystość tła klawiatury</string>
@@ -41,7 +43,6 @@
<string name="pref_category_style">Styl</string> <string name="pref_category_style">Styl</string>
<string name="pref_margin_bottom_title">Margines dolny</string> <string name="pref_margin_bottom_title">Margines dolny</string>
<string name="pref_keyboard_height_title">Wysokość klawiatury</string> <string name="pref_keyboard_height_title">Wysokość klawiatury</string>
<string name="pref_keyboard_height_landscape_title">Wysokość klawiatury w orientacji poziomej</string>
<string name="pref_horizontal_margin_title">Margines poziomy</string> <string name="pref_horizontal_margin_title">Margines poziomy</string>
<string name="pref_character_size_title">Wielkość znaku</string> <string name="pref_character_size_title">Wielkość znaku</string>
<string name="pref_character_size_summary">Wielkość znaków widocznych na klawiaturze (%.2fx)</string> <string name="pref_character_size_summary">Wielkość znaków widocznych na klawiaturze (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Teclado Unexpected</string> <string name="app_name" product="debug">Teclado Unexpected</string>
<string name="app_name" product="default">Teclado Unexpected</string> <string name="app_name" product="default">Teclado Unexpected</string>
<string name="settings_activity_label">Configurar Teclado Unexpected</string> <string name="settings_activity_label">Configurar Teclado Unexpected</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_category_layout">Layout</string> <string name="pref_category_layout">Layout</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Estilo</string> <string name="pref_category_style">Estilo</string>
<string name="pref_margin_bottom_title">Margem inferior</string> <string name="pref_margin_bottom_title">Margem inferior</string>
<string name="pref_keyboard_height_title">Altura do teclado</string> <string name="pref_keyboard_height_title">Altura do teclado</string>
<string name="pref_keyboard_height_landscape_title">Altura do teclado em modo paisagem</string>
<string name="pref_horizontal_margin_title">Margem horizontal</string> <string name="pref_horizontal_margin_title">Margem horizontal</string>
<string name="pref_character_size_title">Tamanho dos indicadores</string> <string name="pref_character_size_title">Tamanho dos indicadores</string>
<string name="pref_character_size_summary">Tamanho dos caracteres visíveis no teclado (%.2fx)</string> <string name="pref_character_size_summary">Tamanho dos caracteres visíveis no teclado (%.2fx)</string>

View File

@@ -1,67 +1,68 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- <string name="app_name" product="debug">Unexpected Keyboard (debug)</string> --> <string name="app_name" product="debug">Unexpected Keyboard (отладка)</string>
<!-- <string name="app_name" product="default">Unexpected Keyboard</string> --> <!-- <string name="app_name" product="default">Unexpected Keyboard</string> -->
<string name="settings_activity_label">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_category_layout">Расположение</string> <string name="pref_category_layout">Расположение</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <string name="pref_label_brightness">Изменить яркость клавиатуры</string>
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <string name="pref_keyboard_opacity">Изменить прозрачность фона</string>
<!-- <string name="pref_key_opacity">Adjust key opacity</string> --> <string name="pref_key_opacity">Изменить прозрачность клавиш</string>
<!-- <string name="pref_key_activated_opacity">Adjust pressed key opacity</string> --> <string name="pref_key_activated_opacity">Изменить прозрачность нажатой клавиши</string>
<string name="pref_layout_title">Изменить раскладку клавиатуры</string> <string name="pref_layout_title">Изменить раскладку клавиатуры</string>
<string name="pref_layout_e_system">Системные настройки</string> <string name="pref_layout_e_system">Системные настройки</string>
<!-- <string name="pref_layout_e_custom">Custom layout</string> --> <string name="pref_layout_e_custom">Пользовательская раскладка</string>
<string name="pref_accents_title">Акцент</string> <string name="pref_accents_title">Акцент</string>
<string name="pref_accents_e_all_installed">Показывать акценты для всех установленных языков</string> <string name="pref_accents_e_all_installed">Показывать акценты для всех установленных языков</string>
<string name="pref_accents_e_selected">Показывать акценты только для выбранного языка</string> <string name="pref_accents_e_selected">Показывать акценты только для выбранного языка</string>
<string name="pref_accents_e_none">Скрыть акценты</string> <string name="pref_accents_e_none">Скрыть акценты</string>
<!-- <string name="pref_show_numpad_title">Show NumPad</string> --> <string name="pref_show_numpad_title">Показывать NumPad</string>
<!-- <string name="pref_show_numpad_never">Never</string> --> <string name="pref_show_numpad_never">Никогда</string>
<!-- <string name="pref_show_numpad_landscape">Only in landscape mode</string> --> <string name="pref_show_numpad_landscape">Только в ландшафтном режиме</string>
<!-- <string name="pref_show_numpad_always">Always</string> --> <string name="pref_show_numpad_always">Всегда</string>
<!-- <string name="pref_numpad_layout">NumPad layout</string> --> <string name="pref_numpad_layout">NumPad раскладка</string>
<!-- <string name="pref_numpad_layout_e_high_first">High digits first</string> --> <string name="pref_numpad_layout_e_high_first">Старшие цифры сверху</string>
<!-- <string name="pref_numpad_layout_e_low_first">Low digits first</string> --> <string name="pref_numpad_layout_e_low_first">Младшие цифры сверху</string>
<!-- <string name="pref_autocapitalisation_title">Automatic capitalisation</string> --> <string name="pref_autocapitalisation_title">Автоматическая смена регистра</string>
<!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> --> <string name="pref_autocapitalisation_summary">Автонажатие Shift в начале каждого предложения</string>
<!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> --> <string name="pref_extra_keys_title">Добавить клавиши на клавиатуру</string>
<!-- <string name="pref_second_layout_title">Secondary layout</string> --> <string name="pref_second_layout_title">Дополнительная раскладка</string>
<string name="pref_second_layout_none">Нету</string> <string name="pref_second_layout_none">Нет</string>
<string name="pref_category_typing">Печатание</string> <string name="pref_category_typing">Печать</string>
<string name="pref_swipe_dist_title">Расстояние пролистывания</string> <string name="pref_swipe_dist_title">Расстояние пролистывания</string>
<string name="pref_swipe_dist_summary">Расстояние между символами в углах клавиш (%s)</string> <string name="pref_swipe_dist_summary">Расстояние между символами в углах клавиш (%s)</string>
<string name="pref_long_timeout_title">Тайм-аут повтора ключа</string> <string name="pref_long_timeout_title">Тайм-аут повтора клавиш</string>
<string name="pref_long_interval_title">Интервал повторения клавиш</string> <string name="pref_long_interval_title">Интервал повтора клавиш</string>
<string name="pref_vibrate_title">Вибрация</string> <string name="pref_vibrate_title">Вибрация</string>
<string name="pref_vibrate_summary">Включение/выключение вибрации при нажатии клавиши</string> <string name="pref_vibrate_summary">Включение/выключение вибрации при нажатии клавиши</string>
<string name="pref_precise_repeat_title">Точные перемещения курсора</string> <string name="pref_precise_repeat_title">Точные перемещения курсора</string>
<string name="pref_precise_repeat_summary">Модулируйте скорость повторения клавиш, проводя пальцем больше или меньше</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_title">Двойное нажатие на Shift активирует Caps lock</string>
<!-- <string name="pref_lock_double_tap_summary">You can lock any modifier by holding it</string> --> <string name="pref_lock_double_tap_summary">Вы можете активировать модификатор, удерживая клавишу</string>
<string name="pref_category_style">Стиль</string> <string name="pref_category_style">Стиль</string>
<string name="pref_margin_bottom_title">Нижняя граница поля</string> <string name="pref_margin_bottom_title">Нижняя граница поля</string>
<string name="pref_keyboard_height_title">Высота клавиатуры</string> <string name="pref_keyboard_height_title">Высота клавиатуры</string>
<string name="pref_keyboard_height_landscape_title">Высота клавиатуры в ландшафтном режиме</string>
<string name="pref_horizontal_margin_title">Горизонтальное поле</string> <string name="pref_horizontal_margin_title">Горизонтальное поле</string>
<string name="pref_character_size_title">Размер этикетки</string> <string name="pref_character_size_title">Размер символов</string>
<string name="pref_character_size_summary">Размер символов, отображаемых на клавиатуре (%.2fx)</string> <string name="pref_character_size_summary">Размер символов, отображаемых на клавиатуре (%.2fx)</string>
<string name="pref_theme">Тема</string> <string name="pref_theme">Тема</string>
<string name="pref_theme_e_system">Системные настройки</string> <string name="pref_theme_e_system">Системные настройки</string>
<string name="pref_theme_e_dark">Темный</string> <string name="pref_theme_e_dark">Темная</string>
<string name="pref_theme_e_light">Светлый</string> <string name="pref_theme_e_light">Светлая</string>
<string name="pref_theme_e_black">Черный</string> <string name="pref_theme_e_black">Черная</string>
<!-- <string name="pref_theme_e_white">White</string> --> <string name="pref_theme_e_white">Белая</string>
<string name="pref_swipe_dist_e_very_short">Очень короткий</string> <string name="pref_swipe_dist_e_very_short">Очень близко</string>
<string name="pref_swipe_dist_e_short">Короткий</string> <string name="pref_swipe_dist_e_short">Близко</string>
<string name="pref_swipe_dist_e_default">Обычный</string> <string name="pref_swipe_dist_e_default">Нормально</string>
<string name="pref_swipe_dist_e_far">Far</string> <string name="pref_swipe_dist_e_far">Далеко</string>
<string name="pref_swipe_dist_e_very_far">Очень далеко</string> <string name="pref_swipe_dist_e_very_far">Очень далеко</string>
<string name="pref_key_horizontal_space">Горизонтальное расстояние между клавишами</string> <string name="pref_key_horizontal_space">Горизонтальное расстояние между клавишами</string>
<string name="pref_key_vertical_space">Расстояние по вертикали между клавишами</string> <string name="pref_key_vertical_space">Расстояние по вертикали между клавишами</string>
<!-- <string name="pref_category_advanced">Advanced</string> --> <string name="pref_category_advanced">Расширенные настройки</string>
<!-- <string name="pref_custom_layout_title">Custom layout</string> --> <string name="pref_custom_layout_title">Пользовательская раскладка</string>
<!-- <string name="pref_custom_layout_summary">See the source code. This option is not meant to be used.</string> --> <string name="pref_custom_layout_summary">Откройте исходный код. Эта параметр не предназначен для использования.</string>
<string name="key_action_next">Next</string> <string name="key_action_next">Далее</string>
<string name="key_action_done">Ввод</string> <string name="key_action_done">Ввод</string>
<string name="key_action_go">Go</string> <string name="key_action_go">Go</string>
<string name="key_action_prev">Предыдущий</string> <string name="key_action_prev">Предыдущий</string>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (debug)</string> <string name="app_name" product="debug">Unexpected Keyboard (debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string> <string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Unexpected Keyboard Ayarları</string> <string name="settings_activity_label">Unexpected Keyboard Ayarları</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->
<string name="pref_category_layout">Düzen</string> <string name="pref_category_layout">Düzen</string>
<!-- <string name="pref_label_brightness">Adjust label brightness</string> --> <!-- <string name="pref_label_brightness">Adjust label brightness</string> -->
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">Stil</string> <string name="pref_category_style">Stil</string>
<string name="pref_margin_bottom_title">Alt boşluk</string> <string name="pref_margin_bottom_title">Alt boşluk</string>
<string name="pref_keyboard_height_title">Klavye yüksekliği</string> <string name="pref_keyboard_height_title">Klavye yüksekliği</string>
<!-- <string name="pref_keyboard_height_landscape_title">Keyboard height in landscape mode</string> -->
<string name="pref_horizontal_margin_title">Yatay boşluk</string> <string name="pref_horizontal_margin_title">Yatay boşluk</string>
<string name="pref_character_size_title">Etiket boyutu</string> <string name="pref_character_size_title">Etiket boyutu</string>
<string name="pref_character_size_summary">Klavye üzerinde gösterilecek karakter boyutu (%.2fx)</string> <string name="pref_character_size_summary">Klavye üzerinde gösterilecek karakter boyutu (%.2fx)</string>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (debug)</string> <string name="app_name" product="debug">Unexpected Keyboard (debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string> <string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">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_category_layout">布局</string> <string name="pref_category_layout">布局</string>
<string name="pref_label_brightness">调整字母亮度</string> <string name="pref_label_brightness">调整字母亮度</string>
<!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> --> <!-- <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> -->
@@ -41,7 +43,6 @@
<string name="pref_category_style">样式</string> <string name="pref_category_style">样式</string>
<string name="pref_margin_bottom_title">键盘下边距</string> <string name="pref_margin_bottom_title">键盘下边距</string>
<string name="pref_keyboard_height_title">键盘高度</string> <string name="pref_keyboard_height_title">键盘高度</string>
<string name="pref_keyboard_height_landscape_title">键盘高度(横屏模式)</string>
<string name="pref_horizontal_margin_title">键盘左右边距</string> <string name="pref_horizontal_margin_title">键盘左右边距</string>
<string name="pref_character_size_title">字符大小</string> <string name="pref_character_size_title">字符大小</string>
<string name="pref_character_size_summary">按键上显示的字符的大小 (%.2fx)</string> <string name="pref_character_size_summary">按键上显示的字符的大小 (%.2fx)</string>

View File

@@ -19,6 +19,7 @@
<item>qwertz_cs</item> <item>qwertz_cs</item>
<item>qwertz_de</item> <item>qwertz_de</item>
<item>qwertz_hu</item> <item>qwertz_hu</item>
<item>qwertz_sk</item>
<item>bgph1</item> <item>bgph1</item>
<item>dvorak</item> <item>dvorak</item>
<item>colemak</item> <item>colemak</item>
@@ -48,6 +49,7 @@
<item>QWERTZ (Czech)</item> <item>QWERTZ (Czech)</item>
<item>QWERTZ (Deutsch)</item> <item>QWERTZ (Deutsch)</item>
<item>QWERTZ (Hungarian)</item> <item>QWERTZ (Hungarian)</item>
<item>QWERTZ (Slovak)</item>
<item>Bulgarian (Phonetic Traditional)</item> <item>Bulgarian (Phonetic Traditional)</item>
<item>Dvorak</item> <item>Dvorak</item>
<item>Colemak</item> <item>Colemak</item>

View File

@@ -3,6 +3,8 @@
<string name="app_name" product="debug">Unexpected Keyboard (debug)</string> <string name="app_name" product="debug">Unexpected Keyboard (debug)</string>
<string name="app_name" product="default">Unexpected Keyboard</string> <string name="app_name" product="default">Unexpected Keyboard</string>
<string name="settings_activity_label">Unexpected Keyboard Settings</string> <string name="settings_activity_label">Unexpected Keyboard Settings</string>
<string name="pref_portrait">In portrait mode</string>
<string name="pref_landscape">In landscape mode</string>
<string name="pref_category_layout">Layout</string> <string name="pref_category_layout">Layout</string>
<string name="pref_label_brightness">Adjust label brightness</string> <string name="pref_label_brightness">Adjust label brightness</string>
<string name="pref_keyboard_opacity">Adjust keyboard background opacity</string> <string name="pref_keyboard_opacity">Adjust keyboard background opacity</string>
@@ -41,7 +43,6 @@
<string name="pref_category_style">Style</string> <string name="pref_category_style">Style</string>
<string name="pref_margin_bottom_title">Margin bottom</string> <string name="pref_margin_bottom_title">Margin bottom</string>
<string name="pref_keyboard_height_title">Keyboard height</string> <string name="pref_keyboard_height_title">Keyboard height</string>
<string name="pref_keyboard_height_landscape_title">Keyboard height in landscape mode</string>
<string name="pref_horizontal_margin_title">Horizontal margin</string> <string name="pref_horizontal_margin_title">Horizontal margin</string>
<string name="pref_character_size_title">Label size</string> <string name="pref_character_size_title">Label size</string>
<string name="pref_character_size_summary">Size of characters displayed on the keyboard (%.2fx)</string> <string name="pref_character_size_summary">Size of characters displayed on the keyboard (%.2fx)</string>

View File

@@ -81,7 +81,7 @@
<item name="colorKeyboard">#000000</item> <item name="colorKeyboard">#000000</item>
<item name="colorKey">#000000</item> <item name="colorKey">#000000</item>
<item name="colorKeyActivated">#333333</item> <item name="colorKeyActivated">#333333</item>
<item name="keyBorderWidth">1dp</item> <item name="keyBorderWidth">0dp</item>
<item name="keyBorderWidthActivated">1dp</item> <item name="keyBorderWidthActivated">1dp</item>
<item name="keyBorderColorLeft">#2a2a2a</item> <item name="keyBorderColorLeft">#2a2a2a</item>
<item name="keyBorderColorTop">#2a2a2a</item> <item name="keyBorderColorTop">#2a2a2a</item>

View File

@@ -6,11 +6,9 @@
<dimen name="key_padding">2dp</dimen> <dimen name="key_padding">2dp</dimen>
<dimen name="key_vertical_interval">2dp</dimen> <dimen name="key_vertical_interval">2dp</dimen>
<dimen name="key_horizontal_interval">2dp</dimen> <dimen name="key_horizontal_interval">2dp</dimen>
<dimen name="key_height">51dp</dimen>
<dimen name="emoji_type_button_height">56dp</dimen> <dimen name="emoji_type_button_height">56dp</dimen>
<dimen name="emoji_grid_height">250dp</dimen> <dimen name="emoji_grid_height">250dp</dimen>
<dimen name="emoji_text_size">28dp</dimen> <dimen name="emoji_text_size">28dp</dimen>
<dimen name="extra_horizontal_margin">0dp</dimen>
<bool name="debug_logs" product="debug">true</bool> <bool name="debug_logs" product="debug">true</bool>
<bool name="debug_logs" product="default">false</bool> <bool name="debug_logs" product="default">false</bool>
</resources> </resources>

View File

@@ -15,7 +15,7 @@
<subtype android:label="%s" android:languageTag="lv" android:imeSubtypeLocale="lv_LV" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_lv,extra_keys=accent_caron|accent_cedille|accent_macron|€"/> <subtype android:label="%s" android:languageTag="lv" android:imeSubtypeLocale="lv_LV" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_lv,extra_keys=accent_caron|accent_cedille|accent_macron|€"/>
<subtype android:label="%s" android:languageTag="nl-BE" android:imeSubtypeLocale="nl_BE" 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="nl-BE" android:imeSubtypeLocale="nl_BE" 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="no" android:imeSubtypeLocale="no_NO" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_no,extra_keys=accent_aigu|€"/> <subtype android:label="%s" android:languageTag="no" android:imeSubtypeLocale="no_NO" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_no,extra_keys=accent_aigu|€"/>
<subtype android:label="%s" android:languageTag="pl" android:imeSubtypeLocale="pl_PL" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty,extra_keys=accent_aigu|accent_ogonek|accent_dot_above|ł"/> <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="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="ru" android:imeSubtypeLocale="ru_RU" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=ru_jcuken"/>
<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="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|€"/>
@@ -23,4 +23,5 @@
<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="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="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="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=é|ě|ŕ|ř|ť|ž|ü|ú|ů|í|ö|ó|ô|á|ä|ś|š|ď|ĺ|ľ|ý|č|ň"/>
</input-method> </input-method>

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

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key key0="q" key1="1" key4="esc"/>
<key key0="w" key1="2"/>
<key key0="e" key1="3" key3="é" key4="ě"/>
<key key0="r" key1="4" key3="ŕ" key4="ř"/>
<key key0="t" key1="5" key4="ť"/>
<key key0="z" key1="6" key4="ž"/>
<key key0="u" key1="7" key2="ü" key3="ú" key4="ů"/>
<key key0="i" key1="8" key3="í"/>
<key key0="o" key1="9" key2="ö" key3="ó" key4="ô"/>
<key key0="p" key1="0" key2="=" key3="\" key4="/"/>
</row>
<row>
<key key0="a" key1="tab" key3="á" key4="ä"/>
<key key0="s" key3="ś" key4="š"/>
<key key0="d" key4="ď"/>
<key key0="f" key1="%" key2="*"/>
<key key0="g" key2="^"/>
<key key0="h" key1="~" key2="÷"/>
<key key0="j" key1="{" key2="}" key3="|" key4="+"/>
<key key0="k" key1="[" key2="]" key3="'" key4="&quot;"/>
<key key0="l" key1="(" key2=")" key3="ĺ" key4="ľ"/>
<key key0="backspace" key3="delete"/>
</row>
<row>
<key key0="shift" key2="loc capslock"/>
<key key0="y" key1="$" key3="ý"/>
<key key0="x"/>
<key key0="c" key4="č"/>
<key key0="v" key4="\@"/>
<key key0="b" key1="\#" key2="&amp;" key3="-" key4="_"/>
<key key0="n" key1="«" key2="»" key4="ň"/>
<key key0="m" key1="&lt;" key2="&gt;"/>
<key key0="," key1=":" key2="\?"/>
<key key0="." key1=";" key2="!"/>
</row>
</keyboard>

View File

@@ -32,6 +32,13 @@
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="23"/> <juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="23"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="24"/> <juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="24"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="25"/> <juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="25"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="26"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="27"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="28"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="29"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="30"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="31"/>
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="32"/>
</PreferenceScreen> </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"/> <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>
@@ -50,10 +57,18 @@
<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="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_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="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="margin_bottom" android:title="@string/pref_margin_bottom_title" android:summary="%sdp" android:defaultValue="5" min="0" max="100"/> <PreferenceScreen android:title="@string/pref_margin_bottom_title">
<juloo.common.IntSlideBarPreference android:key="keyboard_height" android:title="@string/pref_keyboard_height_title" android:summary="%s%%" android:defaultValue="35" min="10" max="50"/> <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="keyboard_height_landscape" android:title="@string/pref_keyboard_height_landscape_title" android:summary="%s%%" android:defaultValue="50" min="20" max="65"/> <juloo.common.IntSlideBarPreference android:key="margin_bottom_landscape" android:title="@string/pref_landscape" android:summary="%sdp" android:defaultValue="3" min="0" max="100"/>
<juloo.common.IntSlideBarPreference android:key="horizontal_margin" android:title="@string/pref_horizontal_margin_title" android:summary="%sdp" android:defaultValue="3" min="0" max="20"/> </PreferenceScreen>
<PreferenceScreen android:title="@string/pref_keyboard_height_title">
<juloo.common.IntSlideBarPreference android:key="keyboard_height" android:title="@string/pref_portrait" android:summary="%s%%" android:defaultValue="35" min="10" max="50"/>
<juloo.common.IntSlideBarPreference android:key="keyboard_height_landscape" android:title="@string/pref_landscape" android:summary="%s%%" android:defaultValue="50" min="20" max="65"/>
</PreferenceScreen>
<PreferenceScreen android:title="@string/pref_horizontal_margin_title">
<juloo.common.IntSlideBarPreference android:key="horizontal_margin_portrait" android:title="@string/pref_portrait" android:summary="%sdp" android:defaultValue="3" min="0" max="30"/>
<juloo.common.IntSlideBarPreference android:key="horizontal_margin_landscape" android:title="@string/pref_landscape" android:summary="%sdp" android:defaultValue="28" min="0" max="200"/>
</PreferenceScreen>
<juloo.common.SlideBarPreference android:key="character_size" android:title="@string/pref_character_size_title" android:summary="@string/pref_character_size_summary" android:defaultValue="1.0" min="0.8" max="1.2"/> <juloo.common.SlideBarPreference android:key="character_size" android:title="@string/pref_character_size_title" android:summary="@string/pref_character_size_summary" android:defaultValue="1.0" min="0.8" max="1.2"/>
<juloo.common.IntSlideBarPreference android:key="key_vertical_space" android:title="@string/pref_key_vertical_space" android:summary="%sdp" android:defaultValue="2" min="0" max="8"/> <juloo.common.IntSlideBarPreference android:key="key_vertical_space" android:title="@string/pref_key_vertical_space" android:summary="%sdp" android:defaultValue="2" min="0" max="8"/>
<juloo.common.IntSlideBarPreference android:key="key_horizontal_space" android:title="@string/pref_key_horizontal_space" android:summary="%sdp" android:defaultValue="2" min="0" max="8"/> <juloo.common.IntSlideBarPreference android:key="key_horizontal_space" android:title="@string/pref_key_horizontal_space" android:summary="%sdp" android:defaultValue="2" min="0" max="8"/>

View File

@@ -32,9 +32,9 @@ final class Config
public boolean vibrateEnabled; public boolean vibrateEnabled;
public long longPressTimeout; public long longPressTimeout;
public long longPressInterval; public long longPressInterval;
public float marginBottom; public float margin_bottom;
public float keyHeight; public float keyHeight;
public float horizontalMargin; public float horizontal_margin;
public float keyVerticalInterval; public float keyVerticalInterval;
public float keyHorizontalInterval; public float keyHorizontalInterval;
public int labelBrightness; // 0 - 255 public int labelBrightness; // 0 - 255
@@ -58,6 +58,7 @@ final class Config
public Set<KeyValue> extra_keys_param; public Set<KeyValue> extra_keys_param;
public final IKeyEventHandler handler; public final IKeyEventHandler handler;
public boolean orientation_landscape = false;
private Config(SharedPreferences prefs, Resources res, IKeyEventHandler h) private Config(SharedPreferences prefs, Resources res, IKeyEventHandler h)
{ {
@@ -67,21 +68,6 @@ final class Config
keyPadding = res.getDimension(R.dimen.key_padding); keyPadding = res.getDimension(R.dimen.key_padding);
labelTextSize = 0.33f; labelTextSize = 0.33f;
sublabelTextSize = 0.22f; sublabelTextSize = 0.22f;
// default values
layout = null;
second_layout = null;
custom_layout = null;
vibrateEnabled = true;
longPressTimeout = 600;
longPressInterval = 65;
marginBottom = res.getDimension(R.dimen.margin_bottom);
keyHeight = res.getDimension(R.dimen.key_height);
horizontalMargin = res.getDimension(R.dimen.horizontal_margin);
keyVerticalInterval = res.getDimension(R.dimen.key_vertical_interval);
keyHorizontalInterval = res.getDimension(R.dimen.key_horizontal_interval);
preciseRepeat = true;
characterSize = 1.f;
accents = 1;
// from prefs // from prefs
refresh(res); refresh(res);
// initialized later // initialized later
@@ -100,6 +86,7 @@ final class Config
public void refresh(Resources res) public void refresh(Resources res)
{ {
DisplayMetrics dm = res.getDisplayMetrics(); DisplayMetrics dm = res.getDisplayMetrics();
orientation_landscape = res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
// The height of the keyboard is relative to the height of the screen. // The height of the keyboard is relative to the height of the screen.
// This is the height of the keyboard if it have 4 rows. // This is the height of the keyboard if it have 4 rows.
int keyboardHeightPercent; int keyboardHeightPercent;
@@ -108,7 +95,7 @@ final class Config
float characterSizeScale = 1.f; float characterSizeScale = 1.f;
String show_numpad_s = _prefs.getString("show_numpad", "never"); String show_numpad_s = _prefs.getString("show_numpad", "never");
show_numpad = "always".equals(show_numpad_s); show_numpad = "always".equals(show_numpad_s);
if (res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) // Landscape mode if (orientation_landscape)
{ {
if ("landscape".equals(show_numpad_s)) if ("landscape".equals(show_numpad_s))
show_numpad = true; show_numpad = true;
@@ -121,7 +108,7 @@ final class Config
keyboardHeightPercent = _prefs.getInt("keyboard_height", 35); keyboardHeightPercent = _prefs.getInt("keyboard_height", 35);
} }
layout = layout_of_string(res, _prefs.getString("layout", "none")); layout = layout_of_string(res, _prefs.getString("layout", "none"));
second_layout = layout_of_string(res, _prefs.getString("second_layout", "none")); second_layout = tweak_secondary_layout(layout_of_string(res, _prefs.getString("second_layout", "none")));
custom_layout = KeyboardData.load_string(_prefs.getString("custom_layout", "")); custom_layout = KeyboardData.load_string(_prefs.getString("custom_layout", ""));
inverse_numpad = _prefs.getString("numpad_layout", "default").equals("low_first"); inverse_numpad = _prefs.getString("numpad_layout", "default").equals("low_first");
// The baseline for the swipe distance correspond to approximately the // The baseline for the swipe distance correspond to approximately the
@@ -132,13 +119,16 @@ final class Config
float swipe_scaling = Math.min(dm.widthPixels, dm.heightPixels) / 10.f * dpi_ratio; float swipe_scaling = Math.min(dm.widthPixels, dm.heightPixels) / 10.f * dpi_ratio;
float swipe_dist_value = Float.valueOf(_prefs.getString("swipe_dist", "15")); float swipe_dist_value = Float.valueOf(_prefs.getString("swipe_dist", "15"));
swipe_dist_px = swipe_dist_value / 25.f * swipe_scaling; swipe_dist_px = swipe_dist_value / 25.f * swipe_scaling;
vibrateEnabled = _prefs.getBoolean("vibrate_enabled", vibrateEnabled); vibrateEnabled = _prefs.getBoolean("vibrate_enabled", true);
longPressTimeout = _prefs.getInt("longpress_timeout", (int)longPressTimeout); longPressTimeout = _prefs.getInt("longpress_timeout", 600);
longPressInterval = _prefs.getInt("longpress_interval", (int)longPressInterval); longPressInterval = _prefs.getInt("longpress_interval", 65);
marginBottom = getDipPref(dm, _prefs, "margin_bottom", marginBottom); margin_bottom = get_dip_pref(dm, oriented_pref("margin_bottom"),
keyVerticalInterval = getDipPref(dm, _prefs, "key_vertical_space", keyVerticalInterval); res.getDimension(R.dimen.margin_bottom));
keyVerticalInterval = get_dip_pref(dm, "key_vertical_space",
res.getDimension(R.dimen.key_vertical_interval));
keyHorizontalInterval = keyHorizontalInterval =
getDipPref(dm, _prefs, "key_horizontal_space", keyHorizontalInterval) get_dip_pref(dm, "key_horizontal_space",
res.getDimension(R.dimen.key_horizontal_interval))
* horizontalIntervalScale; * horizontalIntervalScale;
// Label brightness is used as the alpha channel // Label brightness is used as the alpha channel
labelBrightness = _prefs.getInt("label_brightness", 100) * 255 / 100; labelBrightness = _prefs.getInt("label_brightness", 100) * 255 / 100;
@@ -149,13 +139,13 @@ final class Config
// Do not substract keyVerticalInterval from keyHeight because this is done // Do not substract keyVerticalInterval from keyHeight because this is done
// during rendered. // during rendered.
keyHeight = dm.heightPixels * keyboardHeightPercent / 100 / 4; keyHeight = dm.heightPixels * keyboardHeightPercent / 100 / 4;
horizontalMargin = horizontal_margin =
getDipPref(dm, _prefs, "horizontal_margin", horizontalMargin) get_dip_pref(dm, oriented_pref("horizontal_margin"),
+ res.getDimension(R.dimen.extra_horizontal_margin); res.getDimension(R.dimen.horizontal_margin));
preciseRepeat = _prefs.getBoolean("precise_repeat", preciseRepeat); preciseRepeat = _prefs.getBoolean("precise_repeat", true);
double_tap_lock_shift = _prefs.getBoolean("lock_double_tap", false); double_tap_lock_shift = _prefs.getBoolean("lock_double_tap", false);
characterSize = characterSize =
_prefs.getFloat("character_size", characterSize) _prefs.getFloat("character_size", 1.f)
* characterSizeScale; * characterSizeScale;
accents = Integer.valueOf(_prefs.getString("accents", "1")); accents = Integer.valueOf(_prefs.getString("accents", "1"));
theme = getThemeId(res, _prefs.getString("theme", "")); theme = getThemeId(res, _prefs.getString("theme", ""));
@@ -177,7 +167,8 @@ final class Config
// Extra keys are removed from the set as they are encountered during the // Extra keys are removed from the set as they are encountered during the
// first iteration then automatically added. // first iteration then automatically added.
final Set<KeyValue> extra_keys = new HashSet<KeyValue>(); final Set<KeyValue> extra_keys = new HashSet<KeyValue>();
extra_keys.addAll(extra_keys_subtype); if (extra_keys_subtype != null)
extra_keys.addAll(extra_keys_subtype);
extra_keys.addAll(extra_keys_param); extra_keys.addAll(extra_keys_param);
if (kw.num_pad && show_numpad) if (kw.num_pad && show_numpad)
kw = kw.addNumPad(); kw = kw.addNumPad();
@@ -246,16 +237,40 @@ final class Config
return kw; return kw;
} }
private float getDipPref(DisplayMetrics dm, SharedPreferences prefs, String pref_name, float def) /** Modify a layout to turn it into a secondary layout by changing the
"switch_second" key. */
KeyboardData tweak_secondary_layout(KeyboardData layout)
{
if (layout == null)
return null;
return layout.mapKeys(new KeyboardData.MapKeyValues() {
public KeyValue apply(KeyValue key, boolean localized)
{
if (key.getKind() == KeyValue.Kind.Event
&& key.getEvent() == KeyValue.Event.SWITCH_SECOND)
return KeyValue.getKeyByName("switch_second_back");
return key;
}
});
}
private float get_dip_pref(DisplayMetrics dm, String pref_name, float def)
{ {
float value; float value;
try { value = prefs.getInt(pref_name, -1); } try { value = _prefs.getInt(pref_name, -1); }
catch (Exception e) { value = prefs.getFloat(pref_name, -1f); } catch (Exception e) { value = _prefs.getFloat(pref_name, -1f); }
if (value < 0f) if (value < 0f)
return (def); return (def);
return (TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, value, dm)); return (TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, value, dm));
} }
/** Returns preference name from a prefix depending on orientation. */
private String oriented_pref(String base_name)
{
String suffix = orientation_landscape ? "_landscape" : "_portrait";
return base_name + suffix;
}
private int getThemeId(Resources res, String theme_name) private int getThemeId(Resources res, String theme_name)
{ {
switch (theme_name) switch (theme_name)
@@ -307,6 +322,7 @@ final class Config
case "qwertz_cs": id = R.xml.qwertz_cs; break; case "qwertz_cs": id = R.xml.qwertz_cs; break;
case "qwertz_de": id = R.xml.qwertz_de; break; case "qwertz_de": id = R.xml.qwertz_de; break;
case "qwertz_hu": id = R.xml.qwertz_hu; 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 "ru_jcuken": id = R.xml.local_ru_jcuken; break;
} }
return KeyboardData.load(res, id); return KeyboardData.load(res, id);

View File

@@ -39,7 +39,14 @@ public class ExtraKeyCheckBoxPreference extends CheckBoxPreference
"copy", "copy",
"paste", "paste",
"cut", "cut",
"select_all", "selectAll",
"shareText",
"pasteAsPlainText",
"undo",
"redo",
"replaceText",
"textAssist",
"autofill",
}; };
public static boolean default_checked(String name) public static boolean default_checked(String name)

View File

@@ -44,8 +44,7 @@ class KeyEventHandler implements Config.IKeyEventHandler
switch (key.getEvent()) switch (key.getEvent())
{ {
case CONFIG: _recv.showKeyboardConfig(); break; case CONFIG: _recv.showKeyboardConfig(); break;
case SWITCH_TEXT: case SWITCH_TEXT: _recv.switch_text(); break;
case SWITCH_SECOND_BACK: _recv.switch_main(); break;
case SWITCH_NUMERIC: _recv.switch_layout(R.xml.numeric); break; case SWITCH_NUMERIC: _recv.switch_layout(R.xml.numeric); break;
case SWITCH_EMOJI: _recv.setPane_emoji(); break; case SWITCH_EMOJI: _recv.setPane_emoji(); break;
case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break; case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break;
@@ -56,6 +55,7 @@ class KeyEventHandler implements Config.IKeyEventHandler
conn.performEditorAction(actionId); conn.performEditorAction(actionId);
break; break;
case SWITCH_SECOND: _recv.switch_second(); 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_GREEKMATH: _recv.switch_layout(R.xml.greekmath); break;
case CAPS_LOCK: _recv.set_shift_state(true, true); break; case CAPS_LOCK: _recv.set_shift_state(true, true); break;
} }
@@ -66,17 +66,30 @@ class KeyEventHandler implements Config.IKeyEventHandler
case Modifier: case Modifier:
break; break;
case Editing: case Editing:
switch (key.getEditing()) send_context_menu_action(action_of_editing_key(key.getEditing()));
{
case COPY: send_context_menu_action(android.R.id.copy); break;
case PASTE: send_context_menu_action(android.R.id.paste); break;
case CUT: send_context_menu_action(android.R.id.cut); break;
case SELECT_ALL: send_context_menu_action(android.R.id.selectAll); break;
}
break; break;
} }
} }
static int action_of_editing_key(KeyValue.Editing e)
{
switch (e)
{
case COPY: return android.R.id.copy;
case PASTE: return android.R.id.paste;
case CUT: return android.R.id.cut;
case SELECT_ALL: return android.R.id.selectAll;
case SHARE: return android.R.id.shareText;
case PASTE_PLAIN: return android.R.id.pasteAsPlainText;
case UNDO: return android.R.id.undo;
case REDO: return android.R.id.redo;
case REPLACE: return android.R.id.replaceText;
case ASSIST: return android.R.id.textAssist;
case AUTOFILL: return android.R.id.autofill;
default: return -1; // sad
}
}
// private void handleDelKey(int before, int after) // private void handleDelKey(int before, int after)
// { // {
// CharSequence selection = getCurrentInputConnection().getSelectedText(0); // CharSequence selection = getCurrentInputConnection().getSelectedText(0);
@@ -162,7 +175,8 @@ class KeyEventHandler implements Config.IKeyEventHandler
public void setPane_normal(); public void setPane_normal();
public void showKeyboardConfig(); public void showKeyboardConfig();
public void switch_main(); public void switch_text();
public void switch_primary();
public void switch_second(); public void switch_second();
public void switch_layout(int layout_id); public void switch_layout(int layout_id);

View File

@@ -58,6 +58,14 @@ final class KeyValue
PASTE, PASTE,
CUT, CUT,
SELECT_ALL, SELECT_ALL,
PASTE_PLAIN,
UNDO,
REDO,
// Android context menu actions
REPLACE,
SHARE,
ASSIST,
AUTOFILL,
} }
public static enum Kind public static enum Kind
@@ -356,7 +364,14 @@ final class KeyValue
addEditingKey("copy", "copy", Editing.COPY); addEditingKey("copy", "copy", Editing.COPY);
addEditingKey("paste", "paste", Editing.PASTE); addEditingKey("paste", "paste", Editing.PASTE);
addEditingKey("cut", "cut", Editing.CUT); addEditingKey("cut", "cut", Editing.CUT);
addEditingKey("select_all", "s. all", Editing.SELECT_ALL); 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);
} }
static final HashMap<String, String> keys_descr = new HashMap<String, String>(); static final HashMap<String, String> keys_descr = new HashMap<String, String>();

View File

@@ -33,7 +33,8 @@ public class Keyboard2 extends InputMethodService
private KeyEventHandler _keyeventhandler; private KeyEventHandler _keyeventhandler;
// If not 'null', the layout to use instead of [_currentTextLayout]. // If not 'null', the layout to use instead of [_currentTextLayout].
private KeyboardData _currentSpecialLayout; private KeyboardData _currentSpecialLayout;
private KeyboardData _currentTextLayout; private Current_text_layout _currentTextLayout;
// Layout associated with the currently selected locale.
private KeyboardData _localeTextLayout; private KeyboardData _localeTextLayout;
private ViewGroup _emojiPane = null; private ViewGroup _emojiPane = null;
@@ -41,9 +42,21 @@ public class Keyboard2 extends InputMethodService
private boolean _debug_logs = false; private boolean _debug_logs = false;
KeyboardData main_layout() /** Layout currently visible. */
KeyboardData current_layout()
{ {
return (_currentSpecialLayout != null) ? _currentSpecialLayout : _currentTextLayout; if (_currentSpecialLayout != null)
return _currentSpecialLayout;
if (_currentTextLayout == Current_text_layout.SECONDARY)
return _config.second_layout;
return (_config.layout == null) ? _localeTextLayout : _config.layout;
}
void setTextLayout(Current_text_layout layout)
{
_currentTextLayout = layout;
_currentSpecialLayout = null;
_keyboardView.setKeyboard(current_layout());
} }
@Override @Override
@@ -58,7 +71,6 @@ public class Keyboard2 extends InputMethodService
_config = Config.globalConfig(); _config = Config.globalConfig();
_keyboardView = (Keyboard2View)inflate_view(R.layout.keyboard); _keyboardView = (Keyboard2View)inflate_view(R.layout.keyboard);
_keyboardView.reset(); _keyboardView.reset();
setInputView(_keyboardView);
_debug_logs = getResources().getBoolean(R.bool.debug_logs); _debug_logs = getResources().getBoolean(R.bool.debug_logs);
} }
@@ -149,10 +161,15 @@ public class Keyboard2 extends InputMethodService
refreshAccentsOption(imm, subtype); refreshAccentsOption(imm, subtype);
} }
} }
_config.shouldOfferSwitchingToSecond = if (_config.second_layout == null)
_config.second_layout != null && {
_currentTextLayout != _config.second_layout; _config.shouldOfferSwitchingToSecond = false;
_currentTextLayout = (_config.layout == null) ? _localeTextLayout : _config.layout; _currentTextLayout = Current_text_layout.PRIMARY;
}
else
{
_config.shouldOfferSwitchingToSecond = true;
}
} }
private String actionLabel_of_imeAction(int action) private String actionLabel_of_imeAction(int action)
@@ -193,8 +210,8 @@ public class Keyboard2 extends InputMethodService
} }
} }
/** Might re-create the keyboard view. [_keyboardView.setKeyboard()] must be /** Might re-create the keyboard view. [_keyboardView.setKeyboard()] and
called soon after. */ [setInputView()] must be called soon after. */
private void refresh_config() private void refresh_config()
{ {
int prev_theme = _config.theme; int prev_theme = _config.theme;
@@ -204,7 +221,6 @@ public class Keyboard2 extends InputMethodService
if (prev_theme != _config.theme) if (prev_theme != _config.theme)
{ {
_keyboardView = (Keyboard2View)inflate_view(R.layout.keyboard); _keyboardView = (Keyboard2View)inflate_view(R.layout.keyboard);
setInputView(_keyboardView);
_emojiPane = null; _emojiPane = null;
} }
_keyboardView.reset(); _keyboardView.reset();
@@ -228,8 +244,10 @@ public class Keyboard2 extends InputMethodService
case InputType.TYPE_CLASS_PHONE: case InputType.TYPE_CLASS_PHONE:
case InputType.TYPE_CLASS_DATETIME: case InputType.TYPE_CLASS_DATETIME:
_currentSpecialLayout = KeyboardData.load_pin_entry(getResources()); _currentSpecialLayout = KeyboardData.load_pin_entry(getResources());
break;
default: default:
_currentSpecialLayout = null; _currentSpecialLayout = null;
break;
} }
} }
@@ -239,8 +257,9 @@ public class Keyboard2 extends InputMethodService
refresh_config(); refresh_config();
refresh_action_label(info); refresh_action_label(info);
refresh_special_layout(info); refresh_special_layout(info);
_keyboardView.setKeyboard(main_layout()); _keyboardView.setKeyboard(current_layout());
_keyeventhandler.started(info); _keyeventhandler.started(info);
setInputView(_keyboardView);
if (_debug_logs) if (_debug_logs)
log_editor_info(info); log_editor_info(info);
} }
@@ -258,7 +277,7 @@ public class Keyboard2 extends InputMethodService
public void onCurrentInputMethodSubtypeChanged(InputMethodSubtype subtype) public void onCurrentInputMethodSubtypeChanged(InputMethodSubtype subtype)
{ {
refreshSubtypeImm(); refreshSubtypeImm();
_keyboardView.setKeyboard(main_layout()); _keyboardView.setKeyboard(current_layout());
} }
@Override @Override
@@ -279,7 +298,8 @@ public class Keyboard2 extends InputMethodService
public void onSharedPreferenceChanged(SharedPreferences _prefs, String _key) public void onSharedPreferenceChanged(SharedPreferences _prefs, String _key)
{ {
refresh_config(); refresh_config();
_keyboardView.setKeyboard(main_layout()); setInputView(_keyboardView);
_keyboardView.setKeyboard(current_layout());
} }
@Override @Override
@@ -317,9 +337,10 @@ public class Keyboard2 extends InputMethodService
_keyboardView.set_shift_state(state, lock); _keyboardView.set_shift_state(state, lock);
} }
public void switch_main() public void switch_text()
{ {
_keyboardView.setKeyboard(main_layout()); _currentSpecialLayout = null;
_keyboardView.setKeyboard(current_layout());
} }
public void switch_layout(int layout_id) public void switch_layout(int layout_id)
@@ -329,19 +350,13 @@ public class Keyboard2 extends InputMethodService
public void switch_second() public void switch_second()
{ {
if (_config.second_layout == null) if (_config.second_layout != null)
return; setTextLayout(Current_text_layout.SECONDARY);
KeyboardData layout = }
_config.second_layout.mapKeys(new KeyboardData.MapKeyValues() {
public KeyValue apply(KeyValue key, boolean localized) public void switch_primary()
{ {
if (key.getKind() == KeyValue.Kind.Event setTextLayout(Current_text_layout.PRIMARY);
&& key.getEvent() == KeyValue.Event.SWITCH_SECOND)
return KeyValue.getKeyByName("switch_second_back");
return key;
}
});
_keyboardView.setKeyboard(layout);
} }
public void showKeyboardConfig() public void showKeyboardConfig()
@@ -366,4 +381,10 @@ public class Keyboard2 extends InputMethodService
{ {
return View.inflate(new ContextThemeWrapper(this, _config.theme), layout, null); return View.inflate(new ContextThemeWrapper(this, _config.theme), layout, null);
} }
private static enum Current_text_layout
{
PRIMARY,
SECONDARY
}
} }

View File

@@ -195,7 +195,7 @@ public class Keyboard2View extends View
private KeyboardData.Key getKeyAtPosition(float tx, float ty) private KeyboardData.Key getKeyAtPosition(float tx, float ty)
{ {
KeyboardData.Row row = getRowAtPosition(ty); KeyboardData.Row row = getRowAtPosition(ty);
float x = _config.horizontalMargin; float x = _config.horizontal_margin;
if (row == null || tx < x) if (row == null || tx < x)
return null; return null;
for (KeyboardData.Key key : row.keys) for (KeyboardData.Key key : row.keys)
@@ -230,9 +230,9 @@ public class Keyboard2View extends View
int height = int height =
(int)(_config.keyHeight * _keyboard.keysHeight (int)(_config.keyHeight * _keyboard.keysHeight
+ _keyboard.rows.size() + _keyboard.rows.size()
+ _config.marginTop + _config.marginBottom); + _config.marginTop + _config.margin_bottom);
setMeasuredDimension(width, height); setMeasuredDimension(width, height);
_keyWidth = (width - (_config.horizontalMargin * 2)) / _keyboard.keysWidth; _keyWidth = (width - (_config.horizontal_margin * 2)) / _keyboard.keysWidth;
} }
@Override @Override
@@ -244,10 +244,10 @@ public class Keyboard2View extends View
{ {
// Disable the back-gesture on the keyboard area // Disable the back-gesture on the keyboard area
Rect keyboard_area = new Rect( Rect keyboard_area = new Rect(
left + (int)_config.horizontalMargin, left + (int)_config.horizontal_margin,
top + (int)_config.marginTop, top + (int)_config.marginTop,
right - (int)_config.horizontalMargin, right - (int)_config.horizontal_margin,
bottom - (int)_config.marginBottom); bottom - (int)_config.margin_bottom);
setSystemGestureExclusionRects(Arrays.asList(keyboard_area)); setSystemGestureExclusionRects(Arrays.asList(keyboard_area));
} }
} }
@@ -266,7 +266,7 @@ public class Keyboard2View extends View
for (KeyboardData.Row row : _keyboard.rows) for (KeyboardData.Row row : _keyboard.rows)
{ {
y += row.shift * _config.keyHeight; y += row.shift * _config.keyHeight;
float x = _config.horizontalMargin + _config.keyHorizontalInterval / 2; float x = _config.horizontal_margin + _config.keyHorizontalInterval / 2;
float keyH = row.height * _config.keyHeight - _config.keyVerticalInterval; float keyH = row.height * _config.keyHeight - _config.keyVerticalInterval;
for (KeyboardData.Key k : row.keys) for (KeyboardData.Key k : row.keys)
{ {