Compare commits

..

53 Commits

Author SHA1 Message Date
Jules Aguillon
82f347043a Release 1.23.0 (35) 2023-07-01 17:27:08 +02:00
frimdo
d79f87420f New default Czech layout (#380)
The previous default layout is renamed `latn_qwertz_cz_multifunctional`.
2023-07-01 17:04:31 +02:00
Jules Aguillon
bd39137c28 Add extra keys to Norwegian
The added keys are also placed on the Dvorak layout.
2023-07-01 16:38:36 +02:00
Jules Aguillon
e025fddf2f Accept some escaped keys in custom layouts
These symbols have special meaning when in `res/xml` and are escaped in
standard layouts.
The backslash is not stripped when parsed from the custom layout option.

Treat these backslashed keys specifically to allow standard layouts to
be passed back to the custom layout option.
2023-06-28 18:04:32 +02:00
Jules Aguillon
434f9aaf2d Fix crash when the layout has less than 3 rows 2023-06-28 17:50:32 +02:00
Jules Aguillon
c0833de37c Add hardcoded charmaps for most accents
`KeyCharacterMap.getDeadChar` may not be aware of the same dead keys in
older version of Android.
Hardcoded charmaps are more predictable.
2023-06-25 20:00:29 +02:00
Jules Aguillon
c1b7503239 CI: Check that 'gen_layouts.py' output is uptodate 2023-06-25 16:52:48 +02:00
Jules Aguillon
de6c3b024d Update guidelines about adding layouts
to reflect the recent changes. Also, change `gen_layouts.py` to not
generate warnings for file that are known not to be layouts.
2023-06-25 16:48:18 +02:00
Jules Aguillon
15c608b8cd Use generated arrays in Config.layout_of_string
This function is no longer an hardcoded list of layout ids. It's
replaced by a linear scan of the previously generated array and a new
corresponding array of resource ids.
2023-06-25 16:34:05 +02:00
Jules Aguillon
8ba82d2555 Generate layouts arrays used in settings
`gen_layouts.py` lists the layouts in `res/xml` and generate the
`pref_layout_values` and `pref_layout_entries` arrays into
`res/values/layouts.xml`.

These arrays are hard to maintain as the order has to match, which is
fragile.

This relies on every layouts having a `name` attribute.
2023-06-25 15:52:24 +02:00
Jules Aguillon
f36864533c Standard layout names (#386)
The names are comprised of: script, layout name, country code.

Co-authored-by: grim <verdastelo9604@hotmail.com>
2023-06-25 13:40:20 +02:00
Vasile Chelban
5cfbc6ed5b Added Romanian layout and translations with special romanian characters (#358)
Added Romanian characters to the keyboard layout and changed the positioning
corner for the secondary characters that were conflicting with the
newly-introduced romanian characters

Added Romanian translations
2023-06-25 12:19:00 +02:00
Jules Aguillon
49fbfa71eb Update check_layout.output 2023-06-25 12:13:46 +02:00
Sabbir
8160b1ac05 Add Bengali Provat Layout (#357)
* Add Bengali Provat Layout

I added bengali_provat layout and renamed old bengali to actual layout name.
2023-06-25 12:12:46 +02:00
Jules Aguillon
f1a8e7c04c Specify the script of every layouts and locales
This new information will avoid showing é on a cyrillic layout and ґ on
a latin layout.
2023-06-24 23:46:14 +02:00
Jules Aguillon
9bcfec8bd1 Per-script extra keys
Allows to define a locale's script in 'method.xml' and use that to add
the extra keys for a locale to layouts of the same script only.

A locale of an undefined script will add its extra keys to every
layouts. A layout of an undefined script will have the extra keys of all
the enabled locales.
2023-06-24 23:29:24 +02:00
Jules Aguillon
5fc68373d3 Allow to specify a layout script
Add the `script` attribute, which will be used to implement
script-specific extra keys.
2023-06-22 20:14:20 +02:00
Jules Aguillon
9f90b807f8 Add ə to the extra keys for Italian 2023-06-22 19:24:25 +02:00
Jules Aguillon
a26a535729 Fix _localeTextLayout null on API < 12
On API level < 12 or on some rare cases, `refreshSubtypeLayout` was not
called, making `_localeTextLayout` uninitialized.

This might also happen if `getExtraValueOf` returns an invalid layout name.
eg. `method.xml` contains an invalid layout name.
2023-06-10 18:07:23 +02:00
six-6
b4177b5267 Use utf-8 encoding while formatting translations on Windows. (#376)
When running sync_translations.py on Windows, an error will show because it use gbk encoding by default. Using utf-8 encoding explicitly can fix it.
2023-06-07 18:14:41 +02:00
six-6
b05dfd10d2 Update translations of Simplified Chinese (#377) 2023-06-07 18:13:57 +02:00
Jules Aguillon
3400a96c4f Increase vibration values 2023-06-04 23:33:04 +02:00
KuRa KuRd
53acdf7df7 Add Kurdish Layout (#353)
Add Kurdish Keyboard Layout Qwerty Based Without Shift.
2023-06-04 23:21:14 +02:00
Jules Aguillon
01bfe73fc7 Explicitly map dead key for ñ
`KeyCharacterMap.getDeadChar` seems to not give the expected result on
Android 4.0. This might affect many more dead key combinations that are
not fixed by this commit.
2023-06-04 23:07:35 +02:00
Chasm Solacer
75e6add091 Updated pl (Polish) translation (#374) 2023-06-03 21:07:14 +02:00
Jules Aguillon
e5ae4816df Add automated checks on layouts
The script `check_layout.py` checks some properties about layouts.
No check is an error.

The result of running this script on every layouts is stored in the file
`check_layout.output`, which is useful to track changes.

Add make rules to run this script as well as `sync_translations`.
2023-06-03 21:03:05 +02:00
Jules Aguillon
f451902efa Refactor: Remove dimens used as option defaults
The conversion into px was done twice, leading to wrong values.
2023-06-03 20:20:09 +02:00
Jules Aguillon
a83a19a0a8 Refactor: Handle Event keys in Keyboard2
The `KeyEventHandler` class is intended to handle every keys and to call
into the main class through a limited API.
However, this is not true for `Event` keys, which in practice had each a
corresponding API call.
2023-06-03 20:06:44 +02:00
Jules Aguillon
bd9e25d298 CONTRIBUTING: Translation updates link 2023-06-03 19:38:42 +02:00
Jules Aguillon
77d09cd9ec Fix escaping in values-fr/strings.xml 2023-06-03 19:03:45 +02:00
Jules Aguillon
06633841c0 Update fr translations 2023-06-03 18:46:50 +02:00
Jules Aguillon
59b3341eaf Hide the voice typing key if no suitable IM
Implemented similarly to the IM switching key.
2023-06-03 18:35:16 +02:00
Jules Aguillon
85cdb9b2b5 Add Voice Typing key
The new key switches to any installed "voice" input method.
If several input methods matches, no effort is made to choose.
Might misbehave with some input methods other than Google's on API < 28.

It is placed on the middle of the arrows on the bottom bar. It is
enabled by default and can be removed in the "Extra keys" option.

The key is not removed from the keyboard if no voice input method
exists.
2023-06-03 18:11:42 +02:00
Jules Aguillon
69e0b4c2a2 More control over vibration
The newer haptic feedback API that is used instead of the vibrator
service since ef03dfe doesn't work for everyone.

The new vibration option allow to choose both the newer API ("system")
and the older API ("strong", "medium", "light").
2023-06-03 11:15:19 +02:00
Jules Aguillon
6f418727cf Launcher activity: Don't handle the back button 2023-06-03 10:00:16 +02:00
Jules Aguillon
22d407c46a Per-layout shift modmap
Specify the behavior of shift for a layout. This is intended for locales
that use the same alphabet but have different capital letters (eg.
Bengali).

The modmap is defined like this:

    <keyboard>
      <modmap>
        <shift a="a" b="A"/>
      </modmap>
    </keyboard>
2023-06-03 09:37:59 +02:00
Jules Aguillon
d2a92795e9 Mention Lixquid's editor in CONTRIBUTING.md 2023-05-28 22:57:54 +02:00
marciozomb13
e46535dc1c Update pt-br translation (#367)
Update pt-br translation
2023-05-28 22:24:37 +02:00
marciozomb13
0dd77b5f7a Update pt-BR title.txt (#368)
Updated to Match the translated name
2023-05-28 22:22:39 +02:00
Reza Hosseinzadeh
7558a0f5e3 Modify persian layout and add some new characters (#348)
- Add character پ and ژ
- Change math operators and symbols location
2023-05-24 19:43:30 +02:00
vladgba
62943ba4d3 Fix gravity of keyboard in full screen (#363)
Set keyboard bottom gravity and adjust inputArea height so it doesn't appear on top in fullscreen.
2023-05-24 19:23:28 +02:00
Jules Aguillon
649aea8c79 Increase the range of the "label size" option 2023-05-12 21:37:43 +02:00
Reza Hosseinzadeh
68104e8856 Complete Farsi translation (#346) 2023-04-23 18:57:49 +02:00
Reza Hosseinzadeh
e3347a166f Pull request to add new layout Persian (#342)
* Add persian layout

* Change layoutId_of_string to layout_of_string

* Add translation for Persian
2023-04-23 01:47:25 +02:00
rVnPower
145f209189 Translation update for Vietnamese (#344) 2023-04-21 17:00:56 +02:00
polyctena
cd92086a4d Update German strings.xml (#337) 2023-04-19 19:05:34 +02:00
Moini
a8c2f14394 Update German translation for app descriptions (#336)
* Update short description for German

* Update German translation for long description.
2023-04-17 13:01:09 +02:00
Maki Nishikino
6a2e064faa Updated russian description and strings.xml (#334) 2023-04-16 17:38:28 +02:00
Edgars
3d27ece0a5 Update translation for description in Latvian (#335) 2023-04-16 17:37:10 +02:00
Chasm Solacer
41b6d869c2 Updated pl (Polish) translation (#333) 2023-04-16 14:03:27 +02:00
Jules Aguillon
866b37ca52 Add language: Icelandic 2023-04-15 16:25:45 +02:00
Jules Aguillon
dd51a4c0df New app description 2023-04-15 16:24:11 +02:00
Jules Aguillon
02f4795d2d Update contributing guidelines 2023-04-15 16:11:23 +02:00
103 changed files with 1824 additions and 608 deletions

19
.github/workflows/check-layouts.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Check layouts
# Runs 'gen_layouts.py' and checks that the generated file were uptodate.
# This doesn't run 'check_layout.py'.
on:
workflow_dispatch:
push:
pull_request:
jobs:
check-layouts:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- run: python3 gen_layouts.py
- name: Check that the generated layouts.xml is uptodate, run python3 gen_layouts.py otherwise
run: git diff --exit-code

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="juloo.keyboard2" android:versionCode="34" android:versionName="1.22.1" android:hardwareAccelerated="false">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="juloo.keyboard2" android:versionCode="35" android:versionName="1.23.0" 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">

View File

@@ -37,7 +37,7 @@ gpg -c --armor --pinentry-mode loopback --passphrase debug0 --yes "debug.keystor
A file will be generated inside the local `_build/` folder, called `debug.keystore.asc`
You can copy the content of this file, and with that, paste it into a new github secret in your repo settings.
You can copy the content of this file, and with that, paste it into a new github secret in your repo settings.
The secret must be named `DEBUG_KEYSTORE`
@@ -52,11 +52,8 @@ And finally, install the application with:
make installd
```
The debug version of the application won't be removed, both versions will stay
installed at the same time.
The application must be enabled in the settings:
System > Languages & input > On-screen keyboard > Manage on-screen keyboards.
The released version of the application won't be removed, both versions will
be installed at the same time.
## Debugging the application: INSTALL_FAILED_UPDATE_INCOMPATIBLE
@@ -80,23 +77,39 @@ make installd
### Adding a layout
Layouts are defined in XML, see `res/xml/qwerty.xml`.
Layouts are defined in XML, see `res/xml/latn_qwerty_us.xml`.
An online tool for editing layout files written by @Lixquid is available
[here](https://unexpected-keyboard-layout-editor.lixquid.com/).
An entry must be added to the layout option in `res/values/arrays.xml`, to both
`pref_layout_values` (correspond to the file name) and `pref_layout_entries`
(display name).
Makes sure to specify the `name` attribute like in `latn_qwerty_us.xml`,
otherwise the layout won't be added to the app.
The layout must also be referenced in `srcs/juloo.keyboard2/Config.java` in
`layoutId_of_string`.
The layout file must be placed in the `res/xml/` directory and named according to:
- script (`latn` for latin, etc..)
- layout name (eg. the name of a standard)
- country code (or language code if more adequate)
Then, run `make gen_layouts` to add the layout to the app.
The last step will update the file `res/values/layouts.xml`, that you should
not edit directly.
Run `make check_layouts` to check some properties about your layout. This will
change the file `check_layout.output`, which you should commit.
#### Adding a programming layout
A programming layout must contains every ASCII characters.
The current programming layouts are: QWERTY, Dvorak and Colemak.
Keys with a name starting in `loc ` are hidden unless they are configured for
the user's installed languages in `res/xml/method.xml`. These keys are optional
and will be added automatically when necessary.
See for example, Dvorak, added in https://github.com/Julow/Unexpected-Keyboard/pull/16
It's best to leave free spots on the layout for language-specific symbols that
are added automatically when necessary.
These symbols are defined in `res/xml/method.xml` (`extra_keys`).
It's possible to place extra keys with the `loc` prefix. These keys are
normally hidden unless they are needed.
Some users cannot easily type the characters close the the edges of the screen
due to a bulky phone case. It is best to avoid placing important characters
@@ -116,7 +129,11 @@ Supported locales are defined in `res/xml/method.xml`.
The attributes `languageTag` and `imeSubtypeLocale` define a locale, the
attribute `imeSubtypeExtraValue` defines the default layout and the dead-keys
and other extra keys to show.
and other extra keys to show.
The list of language tags (generally two letters)
and locales (generally of the form `xx_XX`)
can be found in this stackoverflow answer: https://stackoverflow.com/a/7989085
### Translations
@@ -127,10 +144,26 @@ The app can be translated by writing `res/values-<language code>/strings.xml`
(for example `values-fr`, `values-lv`), based on the default:
`res/values/strings.xml` (English).
To check that `strings.xml` is formatted correctly, run
`python sync_translations.py`. This will modify your files.
The store description is found in `metadata/android/<locale>/`,
`short_description.txt` and `full_description.txt`.
Translating changelogs is not useful. Changelogs are written quickly just
before a release and older ones are never shown to anyone currently.
Translating changelogs is not useful.
The app name might be partially translated, the "unexpected" word should remain
untranslated.
As translations need to be updated regularly, you can subscribe to this issue
to receive a notification when an update is needed:
https://github.com/Julow/Unexpected-Keyboard/issues/373
### Adding key combinations
Key combinations are defined in `srcs/juloo.keyboard2/KeyModifier.java`.
For example, keys modified by the `Fn` key are defined in method
`apply_fn_char`.
Keys with special meaning are defined in `KeyValue.java` in method
`getKeyByName`. Their special action are defined in `KeyEventHandler.java` in
method `key_up`

View File

@@ -22,10 +22,23 @@ clean:
rm -rf _build/*.dex _build/class _build/gen _build/*.apk _build/*.unsigned-apk \
_build/*.idsig _build/assets
rebuild_special_font:
cd srcs/special_font && fontforge -lang=ff -script build.pe *.svg
rebuild_special_font: _build/special_font.ttf
cp "$<" srcs/special_font/result.ttf
.PHONY: release debug installd clean rebuild_special_font
sync_translations:
python sync_translations.py
check_layouts:
python check_layout.py $(wildcard res/xml/*.xml) > check_layout.output
gen_layouts:
python gen_layouts.py
# Will modify the source tree.
runtest: rebuild_special_font sync_translations check_layouts gen_layouts
.PHONY: release debug installd clean rebuild_special_font check_layouts \
sync_translations runtest gen_layouts
$(shell mkdir -p _build)
@@ -117,3 +130,10 @@ _build/classes.dex: $(JAVA_FILES) $(R_FILE)
-sourcepath $(SRC_DIR):$(GEN_DIR) \
$^
$(ANDROID_BUILD_TOOLS)/d8 --output $(@D) $(OBJ_DIR)/*/*/* $(subst :, ,$(EXTRA_JARS))
# Font file
FONT_GLYPHS = $(wildcard srcs/special_font/*.svg)
_build/special_font.ttf: srcs/special_font/build.pe $(FONT_GLYPHS)
fontforge -lang=ff -script $< "$@" $(FONT_GLYPHS)

View File

@@ -1,27 +1,5 @@
# Unexpected Keyboard
A lightweight virtual keyboard for developers.
| <img src="/metadata/android/en-US/images/phoneScreenshots/1.png" alt="Screenshot-1" /> | <img src="/metadata/android/en-US/images/phoneScreenshots/2.png" alt="Screenshot-2"/> | <img src="/metadata/android/en-US/images/phoneScreenshots/3.png" alt="Screenshot-3"/> |
| --- | --- | --- |
| <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" /> |
The main feature is easy typing of more characters by swiping the keys toward the corners.
Highlight of some of the features:
- 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.
- Accented keys are accessible using dead keys. First activate the accent, then type the accented letter.
- Very light and fast. Use 500x times less space than Google's keyboard and 15x times less than the default keyboard. No ad, no tracking.
- Personalizable with many options, layouts and themes.
Like any other virtual keyboards, it must be enabled in the system settings. Open the System Settings and go to:
System > Languages & input > On-screen keyboard > Manage on-screen keyboards.
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/juloo.keyboard2/)
@@ -29,6 +7,19 @@ System > Languages & input > On-screen keyboard > Manage on-screen keyboards.
alt="Get it on Google Play"
height="80">](https://play.google.com/store/apps/details?id=juloo.keyboard2)
Lightweight and privacy-conscious virtual keyboard for Android.
| <img src="/metadata/android/en-US/images/phoneScreenshots/1.png" alt="Screenshot-1" /> | <img src="/metadata/android/en-US/images/phoneScreenshots/2.png" alt="Screenshot-2"/> | <img src="/metadata/android/en-US/images/phoneScreenshots/3.png" alt="Screenshot-3"/> |
| --- | --- | --- |
| <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" /> |
The main feature is that you can type more characters by swiping the keys towards the corners.
This application was originally designed for programmers using Termux.
Now perfect for everyday use.
This application contains no ads, doesn't make any network requests and is Open Source.
## Contributing
For instructions on building the application, see

116
check_layout.output Normal file
View File

@@ -0,0 +1,116 @@
# res/xml/arab_alt.xml
Layout includes some ASCII punctuation but not all, missing: !, ", ', +, -, /, :, ;, <, =, >, ?, [, \, ], _, |, ~
1 warnings
# res/xml/arab_pc_ckb.xml
Layout includes some ASCII punctuation but not all, missing: ", %, ', +, ,, ., :, ;, <, =, >, ?, `, |, ~
1 warnings
# res/xml/arab_pc_ir.xml
Layout includes some ASCII punctuation but not all, missing: ", $, %, ', *, ,, /, ;, <, =, >, ?, [, \, ], ^, _, `, {, |, }, ~
1 warnings
# res/xml/arab_pc.xml
Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, |
1 warnings
# res/xml/beng_national.xml
Layout includes some ASCII punctuation but not all, missing: $
Layout doesn't specify a script.
2 warnings
# res/xml/beng_provat.xml
Layout includes some ASCII punctuation but not all, missing: $, &, *, ., /, <, >, [, \, ], `, {, |, }
Layout doesn't specify a script.
2 warnings
Not a layout file: res/xml/bottom_row.xml
# res/xml/cyrl_jcuken_ru.xml
0 warnings
# res/xml/cyrl_jcuken_uk.xml
0 warnings
# res/xml/cyrl_yaverti.xml
Layout includes some ASCII punctuation but not all, missing: ~
1 warnings
# res/xml/deva_alt.xml
Layout includes some ASCII punctuation but not all, missing: #, $, %, &, ', (, ), *, +, ., /, :, <, =, >, @, [, \, ], ^, _, `, {, |, }, ~
1 warnings
# res/xml/deva_inscript.xml
Layout includes some ASCII punctuation but not all, missing: ", $, ', ^, _, `, |
1 warnings
# res/xml/greekmath.xml
Layout includes some ASCII punctuation but not all, missing: !, ", #, $, %, &, ', (, ), *, +, ,, -, /, :, ;, <, >, ?, @, [, \, ], _, `, {, |, }, ~
Layout redefines the bottom row but some important keys are missing, missing: change_method, config, ctrl, switch_emoji, switch_second
Layout doesn't specify a script.
3 warnings
# res/xml/grek_qwerty.xml
0 warnings
# res/xml/hang_dubeolsik_kr.xml
0 warnings
# res/xml/hebr_1_il.xml
Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {, }
1 warnings
# res/xml/hebr_2_il.xml
Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {, }
1 warnings
# res/xml/latn_azerty_fr.xml
0 warnings
# res/xml/latn_bone.xml
Layout includes some ASCII punctuation but not all, missing: $
1 warnings
# res/xml/latn_colemak.xml
0 warnings
# res/xml/latn_dvorak.xml
0 warnings
# res/xml/latn_neo2.xml
0 warnings
# res/xml/latn_qwerty_br.xml
0 warnings
# res/xml/latn_qwerty_es.xml
0 warnings
# res/xml/latn_qwerty_hu.xml
0 warnings
# res/xml/latn_qwerty_lv.xml
0 warnings
# res/xml/latn_qwerty_no.xml
0 warnings
# res/xml/latn_qwerty_pl.xml
0 warnings
# res/xml/latn_qwerty_ro.xml
0 warnings
# res/xml/latn_qwerty_se.xml
0 warnings
# res/xml/latn_qwerty_tr.xml
0 warnings
# res/xml/latn_qwerty_us.xml
0 warnings
# res/xml/latn_qwerty_vi.xml
Layout includes some ASCII punctuation but not all, missing: \
1 warnings
# res/xml/latn_qwertz_cz_multifunctional.xml
Layout includes some ASCII punctuation but not all, missing: `
1 warnings
# res/xml/latn_qwertz_cz.xml
0 warnings
# res/xml/latn_qwertz_de.xml
0 warnings
# res/xml/latn_qwertz_hu.xml
0 warnings
# res/xml/latn_qwertz_sk.xml
Layout includes some ASCII punctuation but not all, missing: \, `
1 warnings
# res/xml/latn_qwertz.xml
0 warnings
Not a layout file: res/xml/method.xml
Not a layout file: res/xml/number_row.xml
# res/xml/numeric.xml
Layout includes some ASCII punctuation but not all, missing: &, ?, @, `
Layout redefines the bottom row but some important keys are missing, missing: change_method, config, switch_emoji, switch_numeric, switch_second
Layout doesn't specify a script.
3 warnings
# res/xml/numpad.xml
Layout includes some ASCII punctuation but not all, missing: !, ", #, $, %, &, ', (, ), ,, :, ;, <, >, ?, @, [, \, ], ^, _, `, {, |, }, ~
Layout doesn't define some important keys, missing: backspace, delete
Layout redefines the bottom row but some important keys are missing, missing: action, change_method, config, ctrl, down, enter, fn, left, right, space, switch_emoji, switch_numeric, switch_second, up
Layout doesn't specify a script.
4 warnings
# res/xml/pin.xml
Layout includes some ASCII punctuation but not all, missing: !, ", $, %, &, ', ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, ~
Layout redefines the bottom row but some important keys are missing, missing: change_method, config, ctrl, fn, switch_emoji, switch_second
Layout doesn't specify a script.
3 warnings
Not a layout file: res/xml/settings.xml

75
check_layout.py Normal file
View File

@@ -0,0 +1,75 @@
import xml.etree.ElementTree as ET
import sys
warning_count = 0
def warn(msg):
global warning_count
print(msg)
warning_count += 1
def key_list_str(keys):
return ", ".join(sorted(list(keys)))
def missing_some_of(keys, symbols, class_name=None):
if class_name is None:
class_name = "of [" + ", ".join(symbols) + "]"
missing = set(symbols).difference(keys)
if len(missing) > 0 and len(missing) != len(symbols):
warn("Layout includes some %s but not all, missing: %s" % (
class_name, key_list_str(missing)))
def missing_required(keys, symbols, msg):
missing = set(symbols).difference(keys)
if len(missing) > 0:
warn("%s, missing: %s" % (msg, key_list_str(missing)))
def unexpected_keys(keys, symbols, msg):
unexpected = set(symbols).intersection(keys)
if len(unexpected) > 0:
warn("%s, unexpected: %s" % (msg, key_list_str(unexpected)))
def parse_layout(fname):
keys = set()
root = ET.parse(fname).getroot()
if root.tag != "keyboard":
return None
for row in root:
for key in row:
for attr in key.keys():
keys.add(key.get(attr).removeprefix("\\"))
return root, keys
def check_layout(layout):
root, keys = layout
missing_some_of(keys, "~!@#$%^&*(){}`[]=\\-_;:/.,?<>'\"+|", "ASCII punctuation")
missing_some_of(keys, "0123456789", "digits")
missing_some_of(keys, ["f11_placeholder", "f12_placeholder"])
missing_some_of(keys, ["esc", "tab"])
missing_required(keys, ["backspace", "delete"], "Layout doesn't define some important keys")
bottom_row_keys = [
"ctrl", "fn", "switch_numeric", "change_method", "switch_emoji",
"config", "switch_second", "enter", "action", "left", "up", "right",
"down", "space"
]
if root.get("bottom_row") == "false":
missing_required(keys, bottom_row_keys,
"Layout redefines the bottom row but some important keys are missing")
else:
unexpected_keys(keys, bottom_row_keys,
"Layout contains keys present in the bottom row")
if root.get("script") == None:
warn("Layout doesn't specify a script.")
for fname in sys.argv[1:]:
layout = parse_layout(fname)
if layout == None:
print("Not a layout file: %s" % fname)
else:
print("# %s" % fname)
warning_count = 0
check_layout(layout)
print("%d warnings" % warning_count)

71
gen_layouts.py Normal file
View File

@@ -0,0 +1,71 @@
#!/usr/bin/env python
# Generates the list of layouts in res/values/layouts.xml from the layout files
# in res/xml. Every layouts must have a 'name' attribute to be listed.
import itertools as it
import sys, os, glob
import xml.etree.ElementTree as XML
# Layouts first in the list (these are the programming layouts). Other layouts
# are sorted alphabetically.
FIRST_LAYOUTS = [ "latn_qwerty_us", "latn_colemak", "latn_dvorak" ]
# File names that are known not to be layouts. Avoid warning about them.
KNOWN_NOT_LAYOUT = set([
"number_row", "numpad", "pin", "bottom_row", "settings", "method",
"greekmath", "numeric" ])
# Read a layout from a file. Returns [None] if [fname] is not a layout.
def read_layout(fname):
root = XML.parse(fname).getroot()
if root.tag != "keyboard":
return None
return { "name": root.get("name") }
# Yields the id (based on the file name) and the display name for every layouts
def read_layouts(files):
for layout_file in files:
layout_id, _ = os.path.splitext(os.path.basename(layout_file))
layout = read_layout(layout_file)
if layout_id in KNOWN_NOT_LAYOUT:
continue
elif layout == None:
print("Not a layout file: %s" % layout_file)
elif layout["name"] == None:
print("Layout doesn't have a name: %s" % layout_id)
else:
yield (layout_id, layout["name"])
# Sort layouts alphabetically, except for layouts in FIRST_LAYOUTS, which are
# placed at the top.
# Returns a list. 'layouts' can be an iterator.
def sort_layouts(layouts):
layouts = dict(layouts)
head = [ (lid, layouts.pop(lid)) for lid in FIRST_LAYOUTS ]
return head + sorted(layouts.items())
# Write the XML arrays used in the preferences.
def generate_arrays(out, layouts):
def mk_array(tag, name, strings_items):
elem = XML.Element(tag, name=name)
for s in strings_items:
item = XML.Element("item")
item.text = s
elem.append(item)
return elem
none_item = [ ("none", "None") ]
custom_item = [ ("custom", "@string/pref_layout_e_custom") ]
values_items, entries_items = zip(*(none_item + layouts + custom_item)) # unzip
ids_items = map(lambda s: "@xml/%s" % s if s not in ["none", "custom"] else "-1", values_items)
root = XML.Element("resources")
root.append(XML.Comment(text="DO NOT EDIT. This file is generated, see gen_layouts.py."))
root.append(mk_array("string-array", "pref_layout_values", values_items))
root.append(mk_array("string-array", "pref_layout_entries", entries_items))
root.append(mk_array("integer-array", "layout_ids", ids_items))
XML.indent(root)
XML.ElementTree(element=root).write(out, encoding="unicode", xml_declaration=True)
layouts = sort_layouts(read_layouts(glob.glob("res/xml/*.xml")))
with open("res/values/layouts.xml", "w") as out:
generate_arrays(out, layouts)

View File

@@ -1,18 +1,6 @@
Diese App ist eine virtuelle Tastatur für Android. Hauptfunktionen sind das einfache Tippen eines jeden ASCII-Zeichens durch Wischgesten, Hilfstasten, Tottasten für Akzente, sowie das Vorhandensein spezieller Tasten (Tabulator, Esc, Pfeiltasten etc.).
Diese Tastatur zeichnet sich dadurch aus, dass man zusätzliche Zeichen durch Wischgesten in Richtung der Tastenecken eingeben kann.
Die Tastatur hat bis zu vier Extrazeichen in den Ecken jeder Taste. Diese Extrazeichen werden durch das Wischen mit dem Finger auf der Taste ausgewählt.
Die Anwendung wurde ursprünglich für das Programmieren in Termux entwickelt.
Mittlerweile ist sie auch für den täglichen Gebrauch perfekt geeignet.
Highlights mancher Funktionen:
- Jedes Zeichen und jede spezielle Taste gibt es auch auf einer PC-Tastatur. Das ist perfekt für die Nutzung von Anwendungen wie Termux.
- Dies schließt auch Tab, Esc und die Pfeil- und Funktionstasten sowie Strg und Alt mit ein!
- Akzenttasten sind über Tottasten verfügbar. Nach Aktivieren des Akzents kan der akzentuierte Buchstabe getippt werden.
- Sehr schlank und schnell. Braucht 500x weniger Speicherplatz als Googles Tastatur und 15x weniger als die Standardtastatur. Keine Werbung, kein Tracking.
- Verschiedene Layouts: QWERTY, QWERTZ, AZERTY. Themes: Weiß, Dunkel, OLED Schwarz. Und viele weitere Optionen.
Wie jede andere virtuelle Tastatur muss diese Tastatur in den Systemeinstellungen aktiviert werden. Dazu Systemeinstellungen öffnen und wie folgt vorgehen:
System > Sprachen und Eingabe > Bildschirmtastatur > Bildschirmtastaturen verwalten.
Diese App enthält keine Werbung, benötigt keinen Netzwerkzugriff und ist quelloffen.

View File

@@ -1 +1 @@
Eine schlanke Bildschirmtastatur für Entwickler
Eine schlanke, datenschutzfreundliche Bildschirmtastatur für Android.

View File

@@ -0,0 +1,9 @@
New layouts: Persian, Kurdish, Bengali Provat, Romanian, Czech
New languages support: Icelandic
Updated translations: Polish, Latvian, Russian, German, Vietnamese, Farsi, Brazilian, French, Simplified Chinese, Romanian
Voice typing shortcut (can be disabled in settings).
Improved vibration settings.
Many bug fixes and improvements.
Thanks to the contributors: @ChasmSolacer, @eandersons, @MAKI1LOVE, @Moini, @polyctena, @rVnPower, @RZHSSNZDH, @vladgba, @marciozomb13, @GoRaN909, @9-2-1, @shmVirus, @GrimPixel, @frimdo

View File

@@ -1,16 +1,6 @@
The main feature is easy typing of more characters by swiping the keys toward the corners.
The main feature is that you can type more characters by swiping the keys towards the corners.
Highlight of some of the features:
This application was originally designed for programmers using Termux.
Now perfect for everyday use.
- 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.
- Accented keys are accessible using dead keys. First activate the accent, then type the accented letter.
- Very light and fast. Use 500x times less space than Google's keyboard and 15x times less than the default keyboard. No ad, no tracking.
- Multiple layouts: QWERTY, QWERTZ, AZERTY. Themes: White, Dark, OLED Black. And many other options.
Like any other virtual keyboards, it must be enabled in the system settings. Open the System Settings and go to:
System > Languages & input > On-screen keyboard > Manage on-screen keyboards.
This application contains no ads, doesn't make any network requests and is Open Source.

View File

@@ -1 +1 @@
A lightweight virtual keyboard for developers.
Lightweight and privacy-conscious virtual keyboard for Android.

View File

@@ -1,16 +1,6 @@
La fonctionnalité principale est l'accès rapide à plus de caractères en balayant les touches vers les coins.
Quelques fonctionnalités:
Cette application a été conçue à l'origine pour les programmeurs utilisant Termux.
Elle est maintenant parfaite pour une utilisation quotidienne.
- 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.
- Les accents sont des touches mortes. Activez d'abord l'accent et tapez ensuite la lettre accentuée.
- Léger et rapide. Utilise 500x fois moins d'espace que le clavier de Google et 15x fois moins que le clavier de base. Pas de pub, pas de traqueur.
- Plusieurs configurations: QWERTY, QWERTZ, AZERTY. Thèmes: Clair, Sombre, Noir OLED. Et beaucoup d'autres options.
Comme tous les claviers virtuels, il doit être activé dans les paramètres systèmes. Ouvrez les paramètres et allez dans:
Système > Langue & saisie > Clavier à l'écran > Gérer les claviers à l'écran.
Cette application ne contient pas de publicité, n'accède pas au réseau et est Open Source.

View File

@@ -1 +1 @@
Le meilleur clavier pour les développeurs.
Clavier virtuel léger et respectueux de la vie privée pour Android.

View File

@@ -1,18 +1,6 @@
Šī lietotne ir tastatūra Android tālruņiem. Galvenās iespējas ir ērta ASCII rakstzīmju ievadīšana ar pavilkšanas kustību, taustiņi piekļūšanai uzsvara zīmēm un pārveidošanas taustiņiem un īpašo taustiņu esamība (Tab, Esc, bultas utt.).
Galvenā iezīme ir iespēja ievadīt vairāk rakstzīmju ar pavilkšanu uz taustiņu stūriem.
Tastatūrā ir redzamas līdz 4 papildus rakstzīmēm katra taustiņa stūros. Tām var piekļūt ar pirksta pavilkšanu uz taustiņa attiecīgajā virzienā.
Šī lietotne sākotnēji tika izstrādāta programmētājiem, kas izmanto Termux.
Tagad lieliski piemērota izmantošanai ikdienā.
Izceltās iespējas:
- Visas rakstzīmes un īpašie taustiņi, kas ir atrodami arī datora tastatūrā. Tas lieliski noder tādās lietotnēs kā, piemēram, Termux.
- Ir iekļauti Tab, Esc, bultas un darbību taustiņi, kā arī Ctrl un Alt.
- Uzsvara zīmju taustiņi ir pieejami ar īpašām pogām. Vispirms jāizvēlas uzsvara zīmes veids, tad jāievada vēlamais burts.
- Ļoti viegla un ātra. Izmanto 500 reižu mazāk vietas kā Google tastatūra un 15 reižu mazāk kā noklusējuma tastatūra. Bez reklāmām un izsekošanas.
- Dažādi izkārtojumi: QWERTY, QWERTZ, AZERTY. Izskats: Gaišs, Tumšs, OLED melns. Kā arī daudzas citas papildiespējas.
Kā jebkura cita tālruņa tastatūra, tā ir jāiespējo ierīces iestatījumos. Jāatver Iestatījumi un tad:
Sistēma > Valodas un ievade > Virtuālā tastatūra > Pārvaldīt tastatūras.
Šī lietotne nesatur reklāmas, neveic nekādus tīkla pieprasījumus, un tās pirmkods ir pieejams visiem.

View File

@@ -1 +1 @@
Viegla un ātra tālruņa tastatūra izstrādātājiem.
Mazizmēra un privātumu ievērojoša virtuālā Android tastatūra.

View File

@@ -1,16 +1,6 @@
Jej główną cechą jest łatwość wprowadzania wielu znaków poprzez przesuwanie po klawiszu do rogu.
Główną cechą tej klawiatury jest możliwość wprowadzania więcej znaków poprzez przesuwanie po klawiszach do ich rogów.
Wyróźnione funkcjonalności:
Ta aplikacja została pierwotnie zaprojektowana z myślą o programistach używających Termuxa.
Obecnie nadaje się doskonale do codziennego użytku.
- 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, 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 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.
Aplikacja nie zawiera reklam, nie żąda dostępu do internetu, a jej kod źródłowy jest dostępny publicznie.

View File

@@ -1 +1 @@
Lekka klawiatura wirtualna dla programistów.
Lekka i dbająca o prywatność klawiatura wirtualna dla Androida.

View File

@@ -1 +1 @@
Unexpected Keyboard
Teclado Unexpected

View File

@@ -0,0 +1,6 @@
Funcționalitatea principală este accesul rapid la o mulțime de caractere ASCII prin glisarea către colțurile tastelor.
Această aplicație a fost concepută inițial pentru programatori care folosec Termux.
Este perfectă pentru uzul cotidian.
Această aplicație nu conține publicitate, nu folosește rețeaua deloc și e Open Source.

View File

@@ -0,0 +1 @@
Tastatură virtuală pentru Android, ușoară și respectuoasă cu viața privată.

View File

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

View File

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

View File

@@ -1 +1 @@
Легкая виртуальная клавиатура для разработчиков.
Легкая виртуальная клавиатура для пользователей, заботящихся о своей конфиденциальности.

View File

@@ -1,16 +1,6 @@
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:
Ứng dụng này ban đầu được thiết kế cho các lập trình viên dùng Termux.
Bây giờ đã hoàn hảo cho việc sử dụng hàng ngày.
- 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
Ứng dụng này không chứa quảng cáo, không cần đến mạng, và có mã nguồn mở.

View File

@@ -1 +1 @@
Bàn phím ảo gọn nhẹ cho các nhà phát triển.
Bàn phím ảo gọn nhẹ và tôn trọng quyền riêng tư cho Android.

View File

@@ -67,6 +67,11 @@
<!-- <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_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Další</string>
<string name="key_action_done">Dokončit</string>
<string name="key_action_go">Spustit</string>

View File

@@ -54,7 +54,7 @@
<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_altblack">Alternatives Schwarz</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>
@@ -67,14 +67,19 @@
<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="pref_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</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> -->
<string name="launcher_button_imesettings">Tastatur aktivieren</string>
<string name="launcher_description">Diese App ist eine virtuelle Tastatur. Tippe auf den Button unten und aktivere Unexpected Keyboard in den Systemeinstellungen.</string>
<string name="launcher_sourcecode">Dies ist eine freie und quelloffene App. Du findest den Quellcode auf <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>. Dort können auch Bugs gemeldet werden.</string>
<string name="launcher_tryhere">Nach Aktivierung kannst du die Tastatur hier ausprobieren:</string>
</resources>

View File

@@ -67,6 +67,11 @@
<!-- <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_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Siguiente</string>
<string name="key_action_done">Hecho</string>
<string name="key_action_go">Ir</string>

85
res/values-fa/strings.xml Normal file
View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" product="debug">صفحه کلید غیرمنتظره</string>
<string name="app_name" product="default">صفحه کلید غیرمنتظره</string>
<string name="settings_activity_label">تنظیمات صفحه کلید غیرمنتظره</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>
<string name="pref_key_opacity">تنظیم کدر بودن کلید</string>
<string name="pref_key_activated_opacity">تنظیم کدر بودن کلید فشرده شده</string>
<string name="pref_layout_title">تغییر طرح صفحه کلید</string>
<string name="pref_layout_e_system">تنظیمات سامانه</string>
<string name="pref_layout_e_custom">طرح صفارشی</string>
<string name="pref_accents_title">لهجه‌ها</string>
<string name="pref_accents_e_all_installed">نمایش لهجه‌ها برای تمام زبان‌هی نصب شده</string>
<string name="pref_accents_e_selected">فقط نمایش لهجه‌ها برای زبان‌های انتخاب شده</string>
<string name="pref_accents_e_none">پنهان کردن لهجه‌ها</string>
<string name="pref_show_numpad_title">نمایش پد شماره‌ها</string>
<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">نمایش ردیف اعداد</string>
<string name="pref_number_row_summary">افزودن ردیف اعداد زمانیکه پد شماره‌ها پنهان است</string>
<string name="pref_numpad_layout">طرح پد شماره‌ها</string>
<string name="pref_numpad_layout_e_high_first">ابتدا اعداد بزرگ</string>
<string name="pref_numpad_layout_e_low_first">ابتدا اعداد کوچک</string>
<string name="pref_extra_keys_title">افزودن کلیدها به صفحه کلید</string>
<string name="pref_second_layout_title">طرح دوم</string>
<string name="pref_second_layout_none">هیچ</string>
<string name="pref_category_typing">درحال نوشتن</string>
<string name="pref_swipe_dist_title">فاصله کشیدن</string>
<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_lock_double_tap_title">دوبار ضربه روی دگرساز برای فعال شدن کپس لاک</string>
<string name="pref_lock_double_tap_summary">شما میتوانید قفل کنید هر میانبری را با نگه داشتن آن</string>
<string name="pref_category_behavior">ٰرفتار</string>
<string name="pref_autocapitalisation_title">بزرگسازی خودکار</string>
<string name="pref_autocapitalisation_summary">در شروع جملات دگرساز را فشار دهید</string>
<string name="pref_switch_input_immediate_title">انتقال به آخرین صفحه کلید استفاده شده</string>
<string name="pref_switch_input_immediate_summary">رفتار کلید تغییردهنده صفحه کلید</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>
<string name="pref_horizontal_margin_title">حاشیه افقی</string>
<string name="pref_character_size_title">اندازه برچسب</string>
<string name="pref_character_size_summary">اندازه نویسه‌های نشان داده شده روی صفحه کلید (%.2fx)</string>
<string name="pref_theme">زمینه</string>
<string name="pref_theme_e_system">تنظیمات سامانه</string>
<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">سیاه مشابه</string>
<string name="pref_theme_e_white">سفید</string>
<string name="pref_theme_e_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>
<string name="pref_swipe_dist_e_far">دور</string>
<string name="pref_swipe_dist_e_very_far">بسیار دور</string>
<string name="pref_key_horizontal_space">فاصله افقی بین کلیدها</string>
<string name="pref_key_vertical_space">فاصله عمودی بین کلیدها</string>
<string name="pref_category_advanced">پیشرفته</string>
<string name="pref_custom_layout_title">طرح شخصی</string>
<string name="pref_custom_layout_summary">کد منبع را ببینید. این گزینه قرار نیست استفاده شود.</string>
<!-- <string name="pref_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">بعدی</string>
<string name="key_action_done">اتمام</string>
<string name="key_action_go">برو</string>
<string name="key_action_prev">قبلی</string>
<string name="key_action_search">جستجو</string>
<string name="key_action_send">ارسال</string>
<string name="launcher_button_imesettings">فعال کردن صفحه کلید</string>
<string name="launcher_description">این برنامه یک صفحه کلید مجازی است. با کلیک روی گزینه زیر به تنظیمات سامانه بروید و صفحه کلید غیرمنتظره را فعال کنید.</string>
<string name="launcher_sourcecode">این یک برنامه آزاد و منبع‌باز است. شما میتوانید پیدا کنید کد منبع را و گزارش کنید باگ‌ها را در <a href="https://github.com/Julow/Unexpected-Keyboard/">گیت‌هاب</a>.</string>
<string name="launcher_tryhere">بعد از فعالسازی، صفحه کلید را اینجا امتحان کنید:</string>
</resources>

View File

@@ -54,9 +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_altblack">Noir 2</string>
<string name="pref_theme_e_white">Blanc</string>
<!-- <string name="pref_theme_e_epaper">ePaper</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>
@@ -67,14 +67,19 @@
<string name="pref_category_advanced">Avancé</string>
<string name="pref_custom_layout_title">Disposition personnalisée</string>
<string name="pref_custom_layout_summary">Cette option n\'est pas faite pour être utilisée.</string>
<string name="pref_vibration_e_disabled">Désactivé</string>
<string name="pref_vibration_e_system">Système</string>
<string name="pref_vibration_e_strong">Fort</string>
<string name="pref_vibration_e_medium">Moyen</string>
<string name="pref_vibration_e_light">Léger</string>
<string name="key_action_next">Suiv.</string>
<string name="key_action_done">Fin</string>
<string name="key_action_go">Aller</string>
<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> -->
<string name="launcher_button_imesettings">Activer le clavier</string>
<string name="launcher_description">Cette application est un clavier virtuel. Activez-le dans les paramètres système en cliquant sur le bouton ci-dessous.</string>
<string name="launcher_sourcecode">Cette application est libre et open-source. Lisez le source code et reportez des problèmes sur <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string>
<string name="launcher_tryhere">Après l\'avoir activé, vous pouvez l\'essayer ici:</string>
</resources>

View File

@@ -67,6 +67,11 @@
<!-- <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_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Prossimo</string>
<string name="key_action_done">Fatto</string>
<string name="key_action_go">Vai</string>

View File

@@ -67,6 +67,11 @@
<!-- <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_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">다음</string>
<string name="key_action_done">확인</string>
<string name="key_action_go">Go</string>

View File

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

View File

@@ -67,6 +67,11 @@
<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="pref_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Nākamais</string>
<string name="key_action_done">Darīts</string>
<string name="key_action_go">Aiziet</string>

View File

@@ -41,7 +41,7 @@
<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_title">Wibracje</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>
@@ -67,14 +67,19 @@
<string name="pref_category_advanced">Zaawansowane</string>
<string name="pref_custom_layout_title">Własny układ</string>
<string name="pref_custom_layout_summary">Zobacz kod źródłowy. Ta opcja nie jest przeznaczona do użycia.</string>
<string name="pref_vibration_e_disabled">Wyłączone</string>
<string name="pref_vibration_e_system">Systemowe</string>
<string name="pref_vibration_e_strong">Silne</string>
<string name="pref_vibration_e_medium">Normalne</string>
<string name="pref_vibration_e_light">Słabe</string>
<string name="key_action_next">Dalej</string>
<string name="key_action_done">OK</string>
<string name="key_action_go">Przejdź</string>
<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> -->
<string name="launcher_button_imesettings">Włącz klawiaturę</string>
<string name="launcher_description">Ta aplikacja jest klawiaturą ekranową. Naciśnij poniższy przycisk, aby przejść do ustawień systemu i włącz Unexpected-Keyboard.</string>
<string name="launcher_sourcecode">Jest to darmowa aplikacja o otwartym kodzie źródłowym. Możesz zobaczyć kod źródłowy oraz zgłosić błedy na <a href="https://github.com/Julow/Unexpected-Keyboard/">Githubie</a>.</string>
<string name="launcher_tryhere">Po jej włączeniu, możesz wypróbować klawiaturę tutaj:</string>
</resources>

View File

@@ -2,32 +2,32 @@
<resources>
<string name="app_name" product="debug">Teclado Unexpected</string>
<string name="app_name" product="default">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="settings_activity_label">Configurações</string>
<string name="pref_portrait">No modo retrato</string>
<string name="pref_landscape">No modo paisagem</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">Ajustar brilho dos rótulos</string>
<string name="pref_keyboard_opacity">Ajustar opacidade do fundo do teclado</string>
<string name="pref_key_opacity">Ajustar opacidade das teclas</string>
<string name="pref_key_activated_opacity">Ajustar opacidade das teclas pressionadas</string>
<string name="pref_layout_title">Mudar layout do teclado</string>
<string name="pref_layout_e_system">Mesmo do sistema</string>
<!-- <string name="pref_layout_e_custom">Custom layout</string> -->
<string name="pref_layout_e_custom">Layout personalizado</string>
<string name="pref_accents_title">Acentos</string>
<string name="pref_accents_e_all_installed">Mostrar acentos para todos os idiomas instalados</string>
<string name="pref_accents_e_selected">Mostrar acentos só para o idioma selecionado</string>
<string name="pref_accents_e_none">Ocultar acentos</string>
<!-- <string name="pref_show_numpad_title">Show NumPad</string> -->
<!-- <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_extra_keys_title">Add keys to the keyboard</string> -->
<!-- <string name="pref_second_layout_title">Secondary layout</string> -->
<string name="pref_show_numpad_title">Mostrar Teclado Numérico</string>
<string name="pref_show_numpad_never">Nunca</string>
<string name="pref_show_numpad_landscape">Somente no modo paisagem</string>
<string name="pref_show_numpad_always">Sempre</string>
<string name="pref_number_row_title">Mostrar fileira de números</string>
<string name="pref_number_row_summary">Adicionar uma linha de números no topo do teclado quando o teclado numérico estiver oculto</string>
<string name="pref_numpad_layout">Layout do teclado numérico</string>
<string name="pref_numpad_layout_e_high_first">gitos maiores primeiro</string>
<string name="pref_numpad_layout_e_low_first">gitos menores primeiro</string>
<string name="pref_extra_keys_title">Adicionar teclas ao teclado</string>
<string name="pref_second_layout_title">Layout secundário</string>
<string name="pref_second_layout_none">Nenhum</string>
<string name="pref_category_typing">Digitação</string>
<string name="pref_swipe_dist_title">Distância a deslizar</string>
@@ -36,11 +36,11 @@
<string name="pref_long_interval_title">Intervalo de repetição de tecla</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_category_behavior">Comportamento</string>
<string name="pref_autocapitalisation_title">Capitalizaçã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_switch_input_immediate_title">Alternar para o último teclado usado</string>
<string name="pref_switch_input_immediate_summary">Comportamento da tecla de troca de teclado</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>
@@ -54,9 +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_theme_e_altblack">Preto Alternativo</string>
<string name="pref_theme_e_white">Branco</string>
<string name="pref_theme_e_epaper">Papel Eletrônico</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>
@@ -64,17 +64,22 @@
<string name="pref_swipe_dist_e_very_far">Muito longo</string>
<string name="pref_key_horizontal_space">Distância horizontal entre teclas</string>
<string name="pref_key_vertical_space">Distância vertical entre teclas</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">Avançado</string>
<string name="pref_custom_layout_title">Layout personalizado</string>
<string name="pref_custom_layout_summary">Veja o código-fonte. Esta opção não deve ser usada.</string>
<!-- <string name="pref_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Próximo</string>
<string name="key_action_done">Pronto</string>
<string name="key_action_go">Ir</string>
<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> -->
<string name="launcher_button_imesettings">Ativar teclado</string>
<string name="launcher_description">Este app é um teclado virtual. Vá para as configurações do sistema clicando no botão abaixo e ative o Teclado Unexpected.</string>
<string name="launcher_sourcecode">Este app é gratuito é de código aberto. Você pode consultar o código ou fazer sugestões em <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string>
<string name="launcher_tryhere">Após ativar, experimente aqui:</string>
</resources>

85
res/values-ro/strings.xml Normal file
View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" product="debug">Tastatură Unexpected (depanare)</string>
<string name="app_name" product="default">Tastatură Unexpected</string>
<string name="settings_activity_label">Setări Tastatură Unexpected</string>
<string name="pref_portrait">În mod portret</string>
<string name="pref_landscape">În mod panoramă</string>
<string name="pref_category_layout">Aspect</string>
<string name="pref_label_brightness">Modifică luminozitatea denumirii</string>
<string name="pref_keyboard_opacity">Modifică opacitatea fundalului tastaturii</string>
<string name="pref_key_opacity">Modifică opacitatea tastelor</string>
<string name="pref_key_activated_opacity">Modifică opacitatea tastei apăsate</string>
<string name="pref_layout_title">Schimbă aranjamentul tastaturii</string>
<string name="pref_layout_e_system">Setări de Sistem</string>
<string name="pref_layout_e_custom">Aranjament personalizat</string>
<string name="pref_accents_title">Accente</string>
<string name="pref_accents_e_all_installed">Arată accentele pentru toate limbile instalate</string>
<string name="pref_accents_e_selected">Aratp accentele doar pentru limba selectată</string>
<string name="pref_accents_e_none">Ascunde accentele</string>
<string name="pref_show_numpad_title">Arată NumPad</string>
<string name="pref_show_numpad_never">Niciodată</string>
<string name="pref_show_numpad_landscape">Doar în mod panoramă</string>
<string name="pref_show_numpad_always">Întotdeanuna</string>
<string name="pref_number_row_title">Arată rândul cu numere</string>
<string name="pref_number_row_summary">Adaugă un rând deasupra tastaturii când numpad-ul este ascuns</string>
<string name="pref_numpad_layout">Aspect NumPad</string>
<string name="pref_numpad_layout_e_high_first">Mai întâi cifrele mari</string>
<string name="pref_numpad_layout_e_low_first">Mai întâi cifrele mici</string>
<string name="pref_extra_keys_title">Adaugă taste pe tastatură</string>
<string name="pref_second_layout_title">Aranjament secundar</string>
<string name="pref_second_layout_none">Nimic</string>
<string name="pref_category_typing">Tipărire</string>
<string name="pref_swipe_dist_title">Distanța de glisare</string>
<string name="pref_swipe_dist_summary">Distanța dintre caracterele din colțurile tastelor (%s)</string>
<string name="pref_long_timeout_title">Timeout pentru repetarea tastelor</string>
<string name="pref_long_interval_title">Intervalul de repetare a tastelor</string>
<string name="pref_lock_double_tap_title">Apăsare dublă pe Shift activează Caps Lock</string>
<string name="pref_lock_double_tap_summary">Puteți activa orice modificator, ținându-l apăsat</string>
<string name="pref_category_behavior">Comportament</string>
<string name="pref_autocapitalisation_title">Scriere automată cu majuscule</string>
<string name="pref_autocapitalisation_summary">Autoapăsare Shift la începutul fiecărei propoziții</string>
<string name="pref_switch_input_immediate_title">Schimbă la ultima tastatură folosită</string>
<string name="pref_switch_input_immediate_summary">Comportamentul tastei pentru schimbarea tastaturii</string>
<string name="pref_vibrate_title">Vibrație</string>
<string name="pref_vibrate_summary">Activați/dezactivați vibrația la apăsarea tastelor</string>
<string name="pref_category_style">Stil</string>
<string name="pref_margin_bottom_title">Marginea de jos</string>
<string name="pref_keyboard_height_title">Înălțimea tastaturii</string>
<string name="pref_horizontal_margin_title">Marginea orizontală</string>
<string name="pref_character_size_title">Dimensiunea simbolurilor</string>
<string name="pref_character_size_summary">Dimensiumea caracterelor afișate pe tastatură (%.2fx)</string>
<string name="pref_theme">Tema</string>
<string name="pref_theme_e_system">Setări de sistem</string>
<string name="pref_theme_e_dark">Întunecată</string>
<string name="pref_theme_e_light">Luminoasă</string>
<string name="pref_theme_e_black">Neagră</string>
<string name="pref_theme_e_altblack">Negru Alternativ</string>
<string name="pref_theme_e_white">Albă</string>
<string name="pref_theme_e_epaper">ePaper</string>
<string name="pref_swipe_dist_e_very_short">Foarte apropiată</string>
<string name="pref_swipe_dist_e_short">Apropiată</string>
<string name="pref_swipe_dist_e_default">Normală</string>
<string name="pref_swipe_dist_e_far">Depărtată</string>
<string name="pref_swipe_dist_e_very_far">Foarte depărtată</string>
<string name="pref_key_horizontal_space">Distanța orizontală dintre taste</string>
<string name="pref_key_vertical_space">Distanța verticală dintre taste</string>
<string name="pref_category_advanced">Setări avansate</string>
<string name="pref_custom_layout_title">Aranjament personalizat</string>
<string name="pref_custom_layout_summary">Deschide codul sursă. Această opțiune nu e destinată spre folosință.</string>
<!-- <string name="pref_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Următor</string>
<string name="key_action_done">Gata</string>
<string name="key_action_go">Go</string>
<string name="key_action_prev">Precedent</string>
<string name="key_action_search">Caută</string>
<string name="key_action_send">Trimite</string>
<string name="launcher_button_imesettings">Activează tastatura</string>
<string name="launcher_description">Această aplicație este o tastatură virtuală. Accesați setările sistemului făcând clic pe butonul de mai jos și activați tastatura Unexpected.</string>
<string name="launcher_sourcecode">Aceasta este o aplicație gratuită și open source. Puteți găsi codul sursă sau raporta erori folosind link-ul <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string>
<string name="launcher_tryhere">După activare, puteți să încercați tastatura aici:</string>
</resources>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<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="pref_portrait">В портретном режиме</string>
<string name="pref_landscape">В ландшафтном режиме</string>
@@ -21,8 +21,8 @@
<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_number_row_title">Показывать номер ряда</string>
<string name="pref_number_row_summary">Добавить ряд цифр над клавиатурой, когда numpad не активен</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>
@@ -36,11 +36,11 @@
<string name="pref_long_interval_title">Интервал повтора клавиш</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_category_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_switch_input_immediate_title">Переключаться к последней используемой клавиатуре</string>
<string name="pref_switch_input_immediate_summary">Поведение клавиши переключения клавиатуры</string>
<string name="pref_vibrate_title">Вибрация</string>
<string name="pref_vibrate_summary">Включение/выключение вибрации при нажатии клавиши</string>
<string name="pref_category_style">Стиль</string>
@@ -54,9 +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_altblack">Альтернативный черный</string>
<string name="pref_theme_e_white">Белая</string>
<!-- <string name="pref_theme_e_epaper">ePaper</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>
@@ -67,14 +67,19 @@
<string name="pref_category_advanced">Расширенные настройки</string>
<string name="pref_custom_layout_title">Пользовательская раскладка</string>
<string name="pref_custom_layout_summary">Откройте исходный код. Эта параметр не предназначен для использования.</string>
<!-- <string name="pref_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Далее</string>
<string name="key_action_done">Ввод</string>
<string name="key_action_go">Go</string>
<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> -->
<string name="launcher_button_imesettings">Включить клавиатуру</string>
<string name="launcher_description">Данное приложение является виртуальной клавиатурой. Зайдите в настройки, нажав кнопку внизу и активируйте Unexpected-Keyboard.</string>
<string name="launcher_sourcecode">Это бесплатное приложение с открытым исходным кодом. Вы можете изучить код или сообщить об ошибках по ссылке <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string>
<string name="launcher_tryhere">После активации вы можете попробовать клавиатуру прямо здесь:</string>
</resources>

View File

@@ -67,6 +67,11 @@
<!-- <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_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">İleri</string>
<string name="key_action_done">Bitti</string>
<string name="key_action_go">İlerle</string>

View File

@@ -69,6 +69,11 @@
<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="pref_vibration_e_disabled">Disabled</string> -->
<!-- <string name="pref_vibration_e_system">System</string> -->
<!-- <string name="pref_vibration_e_strong">Strong</string> -->
<!-- <string name="pref_vibration_e_medium">Medium</string> -->
<!-- <string name="pref_vibration_e_light">Light</string> -->
<string name="key_action_next">Tiếp</string>
<string name="key_action_done">Xong</string>
<string name="key_action_go">Đi</string>

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 设置</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">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">调整键盘背景透明度</string>
<string name="pref_key_opacity">调整按键透明度</string>
<string name="pref_key_activated_opacity">调整按下的按键的透明度</string>
<string name="pref_layout_title">改变键盘布局</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_e_all_installed">显示所有安装的语言的声调符号</string>
<string name="pref_accents_e_selected">只显示选择的语言的声调符号</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 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_number_row_title">显示数字行</string>
<string name="pref_number_row_summary">当数字小键盘隐藏时,在键盘上方显示数字按键</string>
<string name="pref_numpad_layout">数字小键盘布局</string>
<string name="pref_numpad_layout_e_high_first">大数字在上方</string>
<string name="pref_numpad_layout_e_low_first">小数字在上方</string>
<string name="pref_extra_keys_title">选择要显示的按键</string>
<string name="pref_second_layout_title">第二键盘布局</string>
<string name="pref_second_layout_none"></string>
@@ -36,11 +36,11 @@
<string name="pref_long_interval_title">长按后每次重复输入的时间间隔</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_category_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_switch_input_immediate_title">切换到最近使用的键盘</string>
<string name="pref_switch_input_immediate_summary">切换键盘按钮的行为</string>
<string name="pref_vibrate_title">振动</string>
<string name="pref_vibrate_summary">启用或者禁用按下按键时振动</string>
<string name="pref_category_style">样式</string>
@@ -54,9 +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_altblack">黑色带边框</string>
<string name="pref_theme_e_white">白色</string>
<!-- <string name="pref_theme_e_epaper">ePaper</string> -->
<string name="pref_theme_e_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>
@@ -64,17 +64,22 @@
<string name="pref_swipe_dist_e_very_far">非常长</string>
<string name="pref_key_horizontal_space">按键的左右边距</string>
<string name="pref_key_vertical_space">按键的上下边距</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">高级设置</string>
<string name="pref_custom_layout_title">自定义布局</string>
<string name="pref_custom_layout_summary">请查看源代码。这个选项不应该在正常情况下使用。</string>
<string name="pref_vibration_e_disabled">禁用</string>
<string name="pref_vibration_e_system">使用系统振动强度</string>
<string name="pref_vibration_e_strong"></string>
<string name="pref_vibration_e_medium"></string>
<string name="pref_vibration_e_light"></string>
<string name="key_action_next">下一项</string>
<string name="key_action_done">完成</string>
<string name="key_action_go">前往</string>
<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> -->
<string name="launcher_button_imesettings">启用键盘</string>
<string name="launcher_description">这是一个虚拟键盘软件。点击按钮进入系统设置,然后启用 Unexpected-Keyboard 即可使用。</string>
<string name="launcher_sourcecode">这是一个免费且开源的软件。你可以在 <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a> 上找到源代码或者反馈 bug。</string>
<string name="launcher_tryhere">启用键盘后,可以在这里测试效果:</string>
</resources>

View File

@@ -1,77 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="pref_layout_values">
<item>none</item>
<item>azerty</item>
<item>qwerty</item>
<item>qwerty_pt</item>
<item>qwerty_es</item>
<item>qwerty_el</item>
<item>qwerty_ko</item>
<item>qwerty_lv</item>
<item>qwerty_no</item>
<item>qwerty_sv_se</item>
<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>
<item>qwertz_de</item>
<item>qwertz_hu</item>
<item>qwertz_sk</item>
<item>bgph1</item>
<item>dvorak</item>
<item>colemak</item>
<item>neo2</item>
<item>bone</item>
<item>jcuken_ua</item>
<item>bangla</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">
<item>None</item>
<item>AZERTY</item>
<item>QWERTY</item>
<item>QWERTY (Brasileiro)</item>
<item>QWERTY (Español)</item>
<item>QWERTY (Greek)</item>
<item>QWERTY (Korean)</item>
<item>QWERTY (Latvian)</item>
<item>QWERTY (Norwegian)</item>
<item>QWERTY (Swedish)</item>
<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>
<item>QWERTZ (Deutsch)</item>
<item>QWERTZ (Hungarian)</item>
<item>QWERTZ (Slovak)</item>
<item>Bulgarian (Phonetic Traditional)</item>
<item>Dvorak</item>
<item>Colemak</item>
<item>Neo 2</item>
<item>Bone</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">
<item>@string/pref_accents_e_all_installed</item>
<item>@string/pref_accents_e_selected</item>
@@ -132,4 +60,18 @@
<item>25</item>
<item>35</item>
</string-array>
<string-array name="pref_vibration_entries">
<item>@string/pref_vibration_e_disabled</item>
<item>@string/pref_vibration_e_system</item>
<item>@string/pref_vibration_e_strong</item>
<item>@string/pref_vibration_e_medium</item>
<item>@string/pref_vibration_e_light</item>
</string-array>
<string-array name="pref_vibration_values">
<item>disabled</item>
<item>system</item>
<item>strong</item>
<item>medium</item>
<item>light</item>
</string-array>
</resources>

127
res/values/layouts.xml Normal file
View File

@@ -0,0 +1,127 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<!--DO NOT EDIT. This file is generated, see gen_layouts.py.-->
<string-array name="pref_layout_values">
<item>none</item>
<item>latn_qwerty_us</item>
<item>latn_colemak</item>
<item>latn_dvorak</item>
<item>arab_alt</item>
<item>arab_pc</item>
<item>arab_pc_ckb</item>
<item>arab_pc_ir</item>
<item>beng_national</item>
<item>beng_provat</item>
<item>cyrl_jcuken_ru</item>
<item>cyrl_jcuken_uk</item>
<item>cyrl_yaverti</item>
<item>deva_alt</item>
<item>deva_inscript</item>
<item>grek_qwerty</item>
<item>hang_dubeolsik_kr</item>
<item>hebr_1_il</item>
<item>hebr_2_il</item>
<item>latn_azerty_fr</item>
<item>latn_bone</item>
<item>latn_neo2</item>
<item>latn_qwerty_br</item>
<item>latn_qwerty_es</item>
<item>latn_qwerty_hu</item>
<item>latn_qwerty_lv</item>
<item>latn_qwerty_no</item>
<item>latn_qwerty_pl</item>
<item>latn_qwerty_ro</item>
<item>latn_qwerty_se</item>
<item>latn_qwerty_tr</item>
<item>latn_qwerty_vi</item>
<item>latn_qwertz</item>
<item>latn_qwertz_cz</item>
<item>latn_qwertz_cz_multifunctional</item>
<item>latn_qwertz_de</item>
<item>latn_qwertz_hu</item>
<item>latn_qwertz_sk</item>
<item>custom</item>
</string-array>
<string-array name="pref_layout_entries">
<item>None</item>
<item>QWERTY (US)</item>
<item>Colemak</item>
<item>Dvorak</item>
<item>Arabic Alt</item>
<item>Arabic PC</item>
<item>Arabic (کوردی)</item>
<item>Persian PC</item>
<item>বাংলা (জাতীয়)</item>
<item>বাংলা (প্রভাত)</item>
<item>ЙЦУКЕН (Русский)</item>
<item>ЙЦУКЕН (Українська)</item>
<item>ЯВЕРТЪ</item>
<item>देवनागरी (हिंदी)-2</item>
<item>देवनागरी (हिंदी)-1</item>
<item>QWERTY (Greek)</item>
<item>두벌식 (Korean)</item>
<item>Hebrew 1</item>
<item>Hebrew 2</item>
<item>AZERTY (Français)</item>
<item>Bone</item>
<item>Neo 2</item>
<item>QWERTY (Brasileiro)</item>
<item>QWERTY (Español)</item>
<item>QWERTY (Magyar)</item>
<item>QWERTY (Latvian)</item>
<item>QWERTY (Norwegian)</item>
<item>QWERTY (Polski)</item>
<item>QWERTY (Română)</item>
<item>QWERTY (Swedish)</item>
<item>QWERTY (Türkçe)</item>
<item>QWERTY (Vietnamese)</item>
<item>QWERTZ</item>
<item>QWERTZ (Czech)</item>
<item>QWERTZ Multifunctional (Czech)</item>
<item>QWERTZ (Deutsch)</item>
<item>QWERTZ (Magyar)</item>
<item>QWERTZ (Slovak)</item>
<item>@string/pref_layout_e_custom</item>
</string-array>
<integer-array name="layout_ids">
<item>-1</item>
<item>@xml/latn_qwerty_us</item>
<item>@xml/latn_colemak</item>
<item>@xml/latn_dvorak</item>
<item>@xml/arab_alt</item>
<item>@xml/arab_pc</item>
<item>@xml/arab_pc_ckb</item>
<item>@xml/arab_pc_ir</item>
<item>@xml/beng_national</item>
<item>@xml/beng_provat</item>
<item>@xml/cyrl_jcuken_ru</item>
<item>@xml/cyrl_jcuken_uk</item>
<item>@xml/cyrl_yaverti</item>
<item>@xml/deva_alt</item>
<item>@xml/deva_inscript</item>
<item>@xml/grek_qwerty</item>
<item>@xml/hang_dubeolsik_kr</item>
<item>@xml/hebr_1_il</item>
<item>@xml/hebr_2_il</item>
<item>@xml/latn_azerty_fr</item>
<item>@xml/latn_bone</item>
<item>@xml/latn_neo2</item>
<item>@xml/latn_qwerty_br</item>
<item>@xml/latn_qwerty_es</item>
<item>@xml/latn_qwerty_hu</item>
<item>@xml/latn_qwerty_lv</item>
<item>@xml/latn_qwerty_no</item>
<item>@xml/latn_qwerty_pl</item>
<item>@xml/latn_qwerty_ro</item>
<item>@xml/latn_qwerty_se</item>
<item>@xml/latn_qwerty_tr</item>
<item>@xml/latn_qwerty_vi</item>
<item>@xml/latn_qwertz</item>
<item>@xml/latn_qwertz_cz</item>
<item>@xml/latn_qwertz_cz_multifunctional</item>
<item>@xml/latn_qwertz_de</item>
<item>@xml/latn_qwertz_hu</item>
<item>@xml/latn_qwertz_sk</item>
<item>-1</item>
</integer-array>
</resources>

View File

@@ -67,6 +67,11 @@
<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_vibration_e_disabled">Disabled</string>
<string name="pref_vibration_e_system">System</string>
<string name="pref_vibration_e_strong">Strong</string>
<string name="pref_vibration_e_medium">Medium</string>
<string name="pref_vibration_e_light">Light</string>
<string name="key_action_next">Next</string>
<string name="key_action_done">Done</string>
<string name="key_action_go">Go</string>

View File

@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="horizontal_margin">3dp</dimen>
<dimen name="margin_top">3dp</dimen>
<dimen name="margin_bottom">7dp</dimen>
<dimen name="key_padding">2dp</dimen>
<dimen name="key_vertical_interval">2dp</dimen>
<dimen name="key_horizontal_interval">2dp</dimen>
<dimen name="emoji_type_button_height">56dp</dimen>
<dimen name="emoji_grid_height">250dp</dimen>
<dimen name="emoji_text_size">28dp</dimen>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="Arabic Alt" script="arabic">
<row>
<key key0="ض" key2="١" key3="`" key4="esc"/>
<key key0="ص" key2="٢" key3="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="Arabic PC" script="arabic">
<row>
<key key0="ض" key1="&#1614;" key2="١" key3="`" key4="esc"/>
<key key0="ص" key1="&#1611;" key2="٢" key3="\@"/>

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

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard name="Arabic (کوردی)" script="arabic">
<row>
<key key0="ق" key1="ٯ" key2="١" key3="esc"/>
<key key0="و" key1="وو" key2="٢" key3="\@"/>
<key key0="ە" key1="ة" key2="٣" key3="\#" />
<key key0="ر" key1="ڕ" key2="٤" key3="$"/>
<key key0="ت" key1="ط" key2="٥" key3="٪"/>
<key key0="ی" key1="ي" key2="٦" key3="^"/>
<key key0="ێ" key1="ؽ" key2="٧" key3="&amp;"/>
<key key0="ئ" key1="ء" key2="٨" key3="*"/>
<key key0="ۆ" key1="ؤ" key2="٩" key3=")" key4="("/>
<key key0="پ" key1="ث" key2="٠"/>
</row>
<row>
<key key0="ا" key1="أ" key2="tab"/>
<key key0="س" key1="ص"/>
<key key0="ش" key1="ض"/>
<key key0="د" key1="ذ" key2="ۮ"/>
<key key0="ف" key1="ڤ" key2="-" key3="_"/>
<key key0="ه" key2="ھ" key3="ـہ"/>
<key key0="ژ" key1="ـ" key4="}" key3="{"/>
<key key0="ل" key1="ڵ" key3="]" key4="["/>
<key key0="ک" key2="ك" key3="\\"/>
<key key0="گ" key2="غ" key3="/"/>
</row>
<row>
<key key0="ز" key1="ظ"/>
<key key0="خ"/>
<key key0="ج"/>
<key key0="چ"/>
<key key0="ح" key1="&#1567;" key3="!"/>
<key key0="ع" />
<key key0="ب"/>
<key key0="ن" key2="&#1548;" key3="&#1563;"/>
<key key0="م"/>
<key key0="backspace" key2="delete" key3="f11_placeholder" key4="f12_placeholder"/>
</row>
</keyboard>

43
res/xml/arab_pc_ir.xml Normal file
View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Adapted from standard SIRI 9147 -->
<keyboard name="Persian PC" script="arabic">
<row>
<key key0="ض" key2="۱"/>
<key key0="ص" key2="۲"/>
<key key0="ث" key2="۳"/>
<key key0="ق" key2="۴"/>
<key key0="ف" key2="۵"/>
<key key0="غ" key1="۶" key2="،"/>
<key key0="ع" key1="۷"/>
<key key0="ه" key1="۸"/>
<key key0="خ" key1="۹"/>
<key key0="ح" key1="۰"/>
<key key0="ج"/>
</row>
<row>
<key key0="ش" key2="\@"/>
<key key0="س" key2="\#"/>
<key key0="ی" key2="﷼"/>
<key key0="ب" key2="٪"/>
<key key0="ل" key2="&amp;"/>
<key key0="ا" key1="آ" key2="ء" key4="-"/>
<key key0="ت" key1="&#x200C;" key2="+"/>
<key key0="ن" key1="("/>
<key key0="م" key1=")"/>
<key key0="ک"/>
<key key0="گ"/>
</row>
<row>
<key key0="ظ" key2="&#1567;"/>
<key key0="ط"/>
<key key0="ز" key2="«"/>
<key key0="ر" key2="»"/>
<key key0="ژ" key2="."/>
<key key0="ذ" key2=":"/>
<key key0="د" key1="؛"/>
<key key0="پ" key1="!"/>
<key key0="و" key1="ـ"/>
<key key0="چ"/>
<key width="1.0" key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="বাংলা (জাতীয়)">
<row>
<key key0="ঙ" key2="ং" key3="esc" key4="১"/>
<key key0="য" key2="য়" key3="¶" key4="২"/>

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

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8" ?>
<keyboard name="বাংলা (প্রভাত)">
<row>
<key key0="দ" key1="ধ" key2="১" key3="!" key5="esc" />
<key key0="ূ" key1="ঊ" key2="২" key3="\@" />
<key key0="ী" key1="ঈ" key2="৩" key3="\#" />
<key key0="র" key1="ড়" key2="" key3="৳" />
<key key0="ট" key1="ঠ" key2="৫" key3="%" />
<key key0="এ" key1="ঐ" key2="৬" key3="^" />
<key key0="ু" key1="উ" key2="" key3="ঞ" />
<key key0="ি" key1="ই" key2="৮" key3="ৎ" />
<key key0="ও" key1="ঔ" key2="৯" key3="(" key4=")" />
<key key0="প" key1="ফ" key2="" key3="zwj" key4="~" />
</row>
<row>
<key shift="0.5" key0="া" key1="অ" key5="tab" />
<key key0="স" key1="ষ" />
<key key0="ড" key1="ঢ" />
<key key0="ত" key1="থ" />
<key key0="গ" key1="ঘ" key2="-" key3="_" />
<key key0="হ" key1="ঃ" key2="=" key3="+" />
<key key0="জ" key1="ঝ" key3="ে" key4="ৈ" />
<key key0="ক" key1="খ" key3="ো" key4="ৌ" />
<key key0="ল" key1="ং" key2="॥" key3="zwnj" />
</row>
<row>
<key width="1.5" key0="shift" />
<key key0="য়" key1="য" />
<key key0="শ" key1="ঢ়" />
<key key0="চ" key1="ছ" key2="ৃ" key3="," />
<key key0="আ" key1="ঋ" key2="ঁ" key3="।" />
<key key0="ব" key1="ভ" key2="\?" key3="্" />
<key key0="ন" key1="ণ" key2=":" key3=";" />
<key key0="ম" key1="ঙ" key2="&quot;" key3="'" />
<key width="1.5" key0="backspace" key2="delete" />
</row>
</keyboard>

View File

@@ -3,6 +3,6 @@
<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.1" key0="loc voice_typing" key7="up" key6="right" key5="left" key8="down"/>
<key width="1.7" key0="enter" key2="action"/>
</row>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="ЙЦУКЕН (Русский)" script="cyrillic">
<row>
<key key0="й" key2="1" key4="esc"/>
<key key0="ц" key1="loc ї" key2="2" key3="\@" key4="~"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="ЙЦУКЕН (Українська)" script="cyrillic">
<row>
<key shift="0.1 " key0="й" key2="1" key4="esc"/>
<key key0="ц" key1="~" key2="2" key3="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="ЯВЕРТЪ" script="cyrillic">
<row>
<key key0="я" key2="1" key4="esc"/>
<key key0="в" key1="!" key2="2" key3="\@" key4="ч"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="देवनागरी (हिंदी)-2" script="devanagari">
<row>
<key shift="0.35" width="0.9" key0="क" key1="ख" key2="घ" key3="ङ" key4="ग"/>
<key width="0.9" key0="च" key1="छ" key2="झ" key3="ञ" key4="ज"/>
@@ -27,4 +27,4 @@
<key key0="५" key1="१" key2="३" key3="७" key4="९" key5="४" key6="६" key7="२" key8="८"/>
<key key0="backspace" key2="delete"/>
</row>
</keyboard>
</keyboard>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="देवनागरी (हिंदी)-1" script="devanagari">
<row>
<key key0="ौ" key1="औ" key2="₹" key3="esc" key4="१"/>
<key key0="ै" key1="ऐ" key2="ऍ" key3="¶" key4="२"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Greek)" script="latin">
<row>
<key key0=";" key2="1" key4="esc"/>
<key key0="ς" key1="~" key2="2" key3="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="두벌식 (Korean)" script="hangul">
<row>
<key key0="ㅂ" key2="1" key4="esc"/>
<key key0="ㅈ" key1="~" key2="2" key3="\@"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<!-- Based on standard SI-1452-1 -->
<keyboard name="Hebrew 1" script="hebrew">
<row>
<key key0="/" key2="1" key3="!" key4="esc"/>
<key key0="'" key2="2" key3="\@" key1=";"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<!-- Based on standard SI-1452-2 -->
<keyboard name="Hebrew 2" script="hebrew">
<row>
<key key0="ץ" key2="1" key3="!" key4="esc"/>
<key key0="ן" key2="2" key3="\@" key1=";"/>

View File

@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<!-- Adapted from standard NF Z71-300 -->
<!-- https://norme-azerty.fr/ -->
<keyboard name="AZERTY (Français)" script="latin">
<row>
<key key0="a" key2="1" key4="esc"/>
<key key0="z" key2="2" key3="&amp;" key4="~"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard bottom_row="false">
<!-- https://neo-layout.org/Layouts/bone/ -->
<keyboard name="Bone" bottom_row="false" script="latin">
<row>
<key key0="j" key2="esc" key4="…"/>
<key key0="d" key2="°" key4="_"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<!-- https://colemak.com/ -->
<keyboard name="Colemak" script="latin">
<row>
<key key0="q" key1="esc" key2="loc accent_aigu" key3="loc accent_tilde" shift="0.5"/>
<key key0="w" key1="loc accent_grave" key2=" ́" key3="~" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="Dvorak" script="latin">
<row>
<key key0="shift" width="1.5" key2="esc" key4="tab"/>
<key key0="p" key1="loc accent_ring" key2="." key3="&lt;" key4="f11_placeholder"/>
@@ -12,10 +12,10 @@
<key key0="backspace" key2="delete" width="1.5"/>
</row>
<row>
<key key0="a" key2="1" key4="!"/>
<key key0="a" key2="1" key3="loc å" key4="!"/>
<key key0="o" key1="loc accent_macron" key2="2" key3="\@" key4="loc accent_ogonek"/>
<key key0="e" key1="loc accent_caron" key2="3" key3="\#" key4="loc accent_dot_above"/>
<key key0="u" key2="4" key3="$" key4="loc accent_double_aigu"/>
<key key0="u" key1="loc æ" key2="4" key3="$" key4="loc accent_double_aigu"/>
<key key0="i" key2="5" key3="%"/>
<key key0="d" key2="6" key3="^"/>
<key key0="h" key2="7" key3="&amp;"/>
@@ -26,7 +26,7 @@
<row>
<key key0="q" shift="0.5" key1="loc accent_tilde" key2="`" key3="~"/>
<key key0="j" key1="loc accent_aigu" key2="'" key3="&quot;"/>
<key key0="k" key2=";" key3=":"/>
<key key0="k" key1="loc ø" key2=";" key3=":"/>
<key key0="x" key1="loc accent_cedille"/>
<key key0="b"/>
<key key0="m" key2="/" key3="\?"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard bottom_row="false">
<!-- https://neo-layout.org/Layouts/neo/ -->
<keyboard name="Neo 2" bottom_row="false" script="latin">
<row>
<key key0="x" key1="°" key2="1" key4="…"/>
<key key0="v" key1="§" key2="2" key4="_"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<!-- Adapted from standard ABNT NBR 10346 -->
<keyboard name="QWERTY (Brasileiro)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@" key4="!"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Español)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Magyar)" script="latin">
<row>
<key key0="q" key2="0" key4="esc"/>
<key key0="w" key1="'" key2="1" key3="~" key4="|"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Latvian)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@" key4="!"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Norwegian)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Polski)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@"/>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard name="QWERTY (Română)" script="latin">
<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="$" key1="loc ₪"/>
<key key0="t" key1="ț" key2="5" key3="%"/>
<key key0="y" key2="6" key3="^"/>
<key key0="u" key2="7" key3="&amp;"/>
<key key0="i" key1="î" key2="8" key3="*"/>
<key key0="o" key1="loc accent_macron" key2="9" key3="(" key4=")"/>
<key key0="p" key2="0" key3="f11_placeholder" key4="f12_placeholder"/>
</row>
<row>
<key shift="0.5" key0="a" key1="â" key2="ă" key3="`" key4="tab"/>
<key key0="s" key1="ș" key3="loc ß" key4="loc accent_ogonek"/>
<key key0="d" key1="loc accent_grave" key2="loc £" key3="loc accent_aigu"/>
<key key0="f" key1="loc accent_dot_above"/>
<key key0="g" key1="loc accent_caron" key2="-" key3="_"/>
<key key0="h" key2="=" key3="+"/>
<key key0="j" key1="loc accent_trema" key2="loc accent_circonflexe" key4="}" key3="{"/>
<key key0="k" key1="loc accent_double_aigu" key3="[" key4="]"/>
<key key0="l" key2="|" key3="\\"/>
</row>
<row>
<key width="1.5" key0="shift" key2="loc capslock"/>
<key key0="z"/>
<key key0="x"/>
<key key0="c" key1="loc accent_cedille" key2="&lt;" key3="."/>
<key key0="v" key2="&gt;" key3=","/>
<key key0="b" key2="\?" key3="/"/>
<key key0="n" key1="loc accent_tilde" key2=":" key3=";"/>
<key key0="m" key2="&quot;" key3="'"/>
<key width="1.5" key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Swedish)" script="latin">
<row>
<key key0="q" key4="esc" key2="1"/>
<key key0="w" key2="2" key3="`" key4="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTY (Türkçe)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@"/>

View File

@@ -20,7 +20,7 @@ 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>
<keyboard name="QWERTY (US)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="~" key2="2" key3="\@"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<!-- Adapted from standard TCVN 6064-->
<keyboard name="QWERTY (Vietnamese)" script="latin">
<row>
<key key0="q" key1="~" key2="1" key3="`" key4="esc"/>
<key key0="w" key1="accent_horn" key2="2" key3="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTZ" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="^" key2="2" key3="&quot;" key4="\@"/>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keyboard script="latin" name="QWERTZ (Czech)">
<row>
<key key0="q" key1="1" key2="esc" key4="~"/>
<key key0="w" key1="2" key2="+" key3="|" key4="\\"/>
<key key0="e" key1="3" key2="é" key3="^" key4="ě"/>
<key key0="r" key1="4" key4="ř"/>
<key key0="t" key1="5" key3="°" key4="ť"/>
<key key0="z" key1="6" key4="ž"/>
<key key0="u" key1="7" key2="ú" key3="`" key4="ů"/>
<key key0="i" key1="8" key2="í" key3="(" key4=")"/>
<key key0="o" key1="9" key2="ó" key3="/" key4="%"/>
<key key0="p" key1="0" key3="="/>
</row>
<row>
<key shift="0.5" key0="a" key1="tab" key2="á" key3=";"/>
<key key0="s" key4="š"/>
<key key0="d" key4="ď"/>
<key key0="f" key3="["/>
<key key0="g" key3="]"/>
<key key0="h"/>
<key key0="j"/>
<key key0="k"/>
<key key0="l" key1="&quot;" key2="'" key3="$" key4="!"/>
</row>
<row>
<key width="1.5" key0="shift" key2="loc capslock"/>
<key key0="y" key2="ý"/>
<key key0="x" key3="\#"/>
<key key0="c" key3="&amp;" key4="č"/>
<key key0="v" key3="\@"/>
<key key0="b" key1="&lt;" key2="&gt;" key3="{" key4="}"/>
<key key0="n" key1="\?" key2="." key3="," key4="ň"/>
<key key0="m" key1=":" key2="*" key3="-" key4="_"/>
<key width="1.5" key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTZ Multifunctional (Czech)" script="latin">
<row>
<key key0="q" key1="1" key4="esc"/>
<key key0="w" key1="2" key3="~"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<!-- Adapted from standard DIN 2137-1 -->
<keyboard name="QWERTZ (Deutsch)" script="latin">
<row>
<key key0="q" key2="1" key4="esc"/>
<key key0="w" key1="^" key2="2" key3="&quot;" key4="\@"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTZ (Magyar)" script="latin">
<row>
<key key0="q" key2="0" key4="esc"/>
<key key0="w" key1="'" key2="1" key3="~" key4="|"/>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<keyboard name="QWERTZ (Slovak)" script="latin">
<row>
<key key0="q" key1="1" key4="esc"/>
<key key0="w" key1="2"/>

View File

@@ -1,33 +1,35 @@
<?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="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"/>
<subtype android:label="%s" android:languageTag="lt" android:imeSubtypeLocale="lt_LT" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty,extra_keys=accent_ogonek|accent_caron|accent_dot_above|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="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_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,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"/>
<subtype android:label="%s" android:languageTag="ar" android:imeSubtypeLocale="ar" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=arabic,default_layout=arab_ibm"/>
<subtype android:label="%s" android:languageTag="be" android:imeSubtypeLocale="be_BY" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=cyrillic,default_layout=cyrl_jcuken_ru,extra_keys=ґ|є|і|ї|ў"/>
<subtype android:label="%s" android:languageTag="bg" android:imeSubtypeLocale="bg_BG" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=cyrillic,default_layout=cyrl_yaverti,extra_keys=€"/>
<subtype android:label="%s" android:languageTag="bn" android:imeSubtypeLocale="bn_BD" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us,extra_keys=৳"/>
<subtype android:label="%s" android:languageTag="cs" android:imeSubtypeLocale="cs_CZ" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwertz_cz,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="script=latin,default_layout=latn_qwertz_de,extra_keys=accent_trema|ß|€"/>
<subtype android:label="%s" android:languageTag="el" android:imeSubtypeLocale="el" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=grek_qwerty,extra_keys=£|€"/>
<subtype android:label="%s" android:languageTag="en-GB" android:imeSubtypeLocale="en_GB" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us,extra_keys=£|€"/>
<subtype android:label="%s" android:languageTag="en-US" android:imeSubtypeLocale="en_US" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us"/>
<subtype android:label="%s" android:languageTag="es" android:imeSubtypeLocale="es_ES" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_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="script=latin,default_layout=latn_azerty_fr,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="script=hebrew,default_layout=hebr_1_il,extra_keys=₪|€"/>
<subtype android:label="%s" android:languageTag="hi" android:imeSubtypeLocale="hi_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=devanagari,default_layout=deva_inscript,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="hu" android:imeSubtypeLocale="hu_HU" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwertz_hu,extra_keys=accent_aigu|accent_trema|accent_ogonek|€"/>
<subtype android:label="%s" android:languageTag="is" android:imeSubtypeLocale="is_IS" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us,extra_keys=ð|þ|ö|æ|accent_aigu"/>
<subtype android:label="%s" android:languageTag="it" android:imeSubtypeLocale="it_IT" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us,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="script=hangul,default_layout=latn_qwerty_us"/>
<subtype android:label="%s" android:languageTag="lt" android:imeSubtypeLocale="lt_LT" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us,extra_keys=accent_ogonek|accent_caron|accent_dot_above|accent_macron|€"/>
<subtype android:label="%s" android:languageTag="lv" android:imeSubtypeLocale="lv_LV" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_lv,extra_keys=accent_caron|accent_cedille|accent_macron|€"/>
<subtype android:label="%s" android:languageTag="mr" android:imeSubtypeLocale="mr_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=devanagari,default_layout=deva_inscript,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="ne" android:imeSubtypeLocale="ne_NE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=devanagari,default_layout=deva_inscript,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="nl-BE" android:imeSubtypeLocale="nl_BE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_azerty_fr,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="script=latin,default_layout=latn_qwerty_no,extra_keys=€|æ|å|ø"/>
<subtype android:label="%s" android:languageTag="pl" android:imeSubtypeLocale="pl_PL" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_pl"/>
<subtype android:label="%s" android:languageTag="pt" android:imeSubtypeLocale="pt_BR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_pt,extra_keys=accent_aigu|accent_cedille|accent_circonflexe|accent_grave|accent_tilde|€"/>
<subtype android:label="%s" android:languageTag="ro" android:imeSubtypeLocale="ro_RO" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_ro,extra_keys=ă|â|î|ș|ț|€|$"/>
<subtype android:label="%s" android:languageTag="ru" android:imeSubtypeLocale="ru_RU" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=cyrl_jcuken_ru"/>
<subtype android:label="%s" android:languageTag="sk" android:imeSubtypeLocale="sk_SK" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwertz_sk,extra_keys=é|ě|ŕ|ř|ť|ž|ü|ú|ů|í|ö|ó|ô|á|ä|ś|š|ď|ĺ|ľ|ý|č|ň"/>
<subtype android:label="%s" android:languageTag="sv" android:imeSubtypeLocale="sv_SE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_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="script=latin,default_layout=latn_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="script=cyrillic,default_layout=cyrl_jcuken_uk,extra_keys=ґ|є|і|ї"/>
<subtype android:label="%s" android:languageTag="vi" android:imeSubtypeLocale="vi_VN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_vi"/>
</input-method>

View File

@@ -55,7 +55,7 @@
<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"/>
<ListPreference android:key="vibration_behavior" android:title="@string/pref_vibrate_title" android:summary="@string/pref_vibrate_summary" android:defaultValue="system" android:entries="@array/pref_vibration_entries" android:entryValues="@array/pref_vibration_values"/>
</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"/>
@@ -75,7 +75,7 @@
<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.75" max="1.5"/>
<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"/>
</PreferenceCategory>

View File

@@ -3,11 +3,14 @@ package juloo.keyboard2;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.KeyEvent;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
final class Config
@@ -31,7 +34,7 @@ final class Config
public boolean number_row;
public float swipe_dist_px;
public float slide_step_px;
public boolean vibrateEnabled;
public VibratorCompat.VibrationBehavior vibration_behavior;
public long longPressTimeout;
public long longPressInterval;
public float margin_bottom;
@@ -53,10 +56,11 @@ final class Config
// Dynamically set
public boolean shouldOfferSwitchingToNextInputMethod;
public boolean shouldOfferSwitchingToSecond;
public boolean shouldOfferVoiceTyping;
public String actionLabel; // Might be 'null'
public int actionId; // Meaningful only when 'actionLabel' isn't 'null'
public boolean swapEnterActionKey; // Swap the "enter" and "action" keys
public Set<KeyValue> extra_keys_subtype;
public ExtraKeys extra_keys_subtype;
public Set<KeyValue> extra_keys_param;
public final IKeyEventHandler handler;
@@ -75,6 +79,7 @@ final class Config
// initialized later
shouldOfferSwitchingToNextInputMethod = false;
shouldOfferSwitchingToSecond = false;
shouldOfferVoiceTyping = false;
actionLabel = null;
actionId = 0;
swapEnterActionKey = false;
@@ -123,17 +128,13 @@ final class Config
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);
vibration_behavior =
VibratorCompat.VibrationBehavior.of_string(_prefs.getString("vibration_behavior", "system"));
longPressTimeout = _prefs.getInt("longpress_timeout", 600);
longPressInterval = _prefs.getInt("longpress_interval", 65);
margin_bottom = get_dip_pref(dm, oriented_pref("margin_bottom"),
res.getDimension(R.dimen.margin_bottom));
keyVerticalInterval = get_dip_pref(dm, "key_vertical_space",
res.getDimension(R.dimen.key_vertical_interval));
keyHorizontalInterval =
get_dip_pref(dm, "key_horizontal_space",
res.getDimension(R.dimen.key_horizontal_interval))
* horizontalIntervalScale;
margin_bottom = get_dip_pref_oriented(dm, "margin_bottom", 7, 3);
keyVerticalInterval = get_dip_pref(dm, "key_vertical_space", 2);
keyHorizontalInterval = get_dip_pref(dm, "key_horizontal_space", 2) * horizontalIntervalScale;
// Label brightness is used as the alpha channel
labelBrightness = _prefs.getInt("label_brightness", 100) * 255 / 100;
// Keyboard opacity
@@ -144,8 +145,7 @@ final class Config
// during rendered.
keyHeight = dm.heightPixels * keyboardHeightPercent / 100 / 4;
horizontal_margin =
get_dip_pref(dm, oriented_pref("horizontal_margin"),
res.getDimension(R.dimen.horizontal_margin));
get_dip_pref_oriented(dm, "horizontal_margin", 3, 28);
double_tap_lock_shift = _prefs.getBoolean("lock_double_tap", false);
characterSize =
_prefs.getFloat("character_size", 1.f)
@@ -179,7 +179,7 @@ final class Config
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_subtype.compute(extra_keys, kw.script);
extra_keys.addAll(extra_keys_param);
boolean number_row = this.number_row && !show_numpad;
if (number_row)
@@ -210,6 +210,8 @@ final class Config
KeyValue.getKeyByName("enter") : action_key;
case SWITCH_SECOND:
return shouldOfferSwitchingToSecond ? key : null;
case SWITCH_VOICE_TYPING:
return shouldOfferVoiceTyping ? key : null;
}
break;
case Keyevent:
@@ -306,11 +308,12 @@ final class Config
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)
/** [get_dip_pref] depending on orientation. */
float get_dip_pref_oriented(DisplayMetrics dm, String pref_base_name, float def_port, float def_land)
{
String suffix = orientation_landscape ? "_landscape" : "_portrait";
return base_name + suffix;
float def = orientation_landscape ? def_land : def_port;
return get_dip_pref(dm, pref_base_name + suffix, def);
}
private int getThemeId(Resources res, String theme_name)
@@ -335,47 +338,34 @@ final class Config
}
}
/** Obtained from XML. */
static List<String> layout_ids_str = null;
static TypedArray layout_ids_res = null;
/** Might return [null] if the selected layout is "system", "custom" or if
the name is not recognized. */
public KeyboardData layout_of_string(Resources res, String name)
{
int id = R.xml.qwerty; // The config might store an invalid layout, don't crash
if (layout_ids_str == null)
{
layout_ids_str = Arrays.asList(res.getStringArray(R.array.pref_layout_values));
layout_ids_res = res.obtainTypedArray(R.array.layout_ids);
}
int i = layout_ids_str.indexOf(name);
if (i >= 0)
{
int id = layout_ids_res.getResourceId(i, 0);
if (id > 0)
return KeyboardData.load(res, id);
// Fallthrough
}
switch (name)
{
case "system": case "none": return null;
case "custom": if (custom_layout != null) return custom_layout; break;
case "azerty": id = R.xml.azerty; break;
case "bangla": id = R.xml.bangla; break;
case "bgph1": id = R.xml.local_bgph1; break;
case "bone": id = R.xml.bone; break;
case "colemak": id = R.xml.colemak; break;
case "dvorak": id = R.xml.dvorak; 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;
case "qwerty_el": id = R.xml.qwerty_el; break;
case "qwerty_es": id = R.xml.qwerty_es; break;
case "qwerty_hu": id = R.xml.qwerty_hu; break;
case "qwerty_ko": id = R.xml.qwerty_ko; break;
case "qwerty_lv": id = R.xml.qwerty_lv; break;
case "qwerty_no": id = R.xml.qwerty_no; break;
case "qwerty_pt": id = R.xml.qwerty_pt; break;
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;
case "custom": return custom_layout;
case "system":
case "none":
default: return null;
}
return KeyboardData.load(res, id);
}
char inverse_numpad_char(char c)

View File

@@ -16,6 +16,7 @@ public class ExtraKeyCheckBoxPreference extends CheckBoxPreference
{
"alt",
"meta",
"voice_typing",
"accent_aigu",
"accent_grave",
"accent_double_aigu",
@@ -56,6 +57,8 @@ public class ExtraKeyCheckBoxPreference extends CheckBoxPreference
{
switch (name)
{
case "voice_typing":
return true;
default:
return false;
}

View File

@@ -0,0 +1,57 @@
package juloo.keyboard2;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
class ExtraKeys
{
Map<String, List<KeyValue>> _keys_per_script;
public ExtraKeys()
{
_keys_per_script = new HashMap<String, List<KeyValue>>();
}
public void add_keys_for_script(String script, List<KeyValue> kvs)
{
List<KeyValue> ks = _keys_per_script.get(script);
if (ks == null) ks = new ArrayList<KeyValue>();
ks.addAll(kvs);
_keys_per_script.put(script, ks);
}
/** Add the keys that should be added to the keyboard into [dst]. [null] is
a valid script. */
public void compute(Set<KeyValue> dst, String script)
{
if (script == null)
{
for (String sc : _keys_per_script.keySet())
get_keys_of_script(dst, sc);
}
else
{
get_keys_of_script(dst, null);
get_keys_of_script(dst, script);
}
}
void get_keys_of_script(Set<KeyValue> dst, String script)
{
List<KeyValue> ks = _keys_per_script.get(script);
if (ks != null)
dst.addAll(ks);
}
public static List<KeyValue> parse_extra_keys(String str)
{
List<KeyValue> dst = new ArrayList<KeyValue>();
String[] ks = str.split("\\|");
for (int i = 0; i < ks.length; i++)
dst.add(KeyValue.getKeyByName(ks[i]));
return dst;
}
}

View File

@@ -10,8 +10,6 @@ class KeyEventHandler implements Config.IKeyEventHandler
IReceiver _recv;
Autocapitalisation _autocap;
public int actionId; // Action performed by the Action key.
public KeyEventHandler(Looper looper, IReceiver recv)
{
_recv = recv;
@@ -40,27 +38,7 @@ class KeyEventHandler implements Config.IKeyEventHandler
{
case Char: send_text(String.valueOf(key.getChar())); break;
case String: send_text(key.getString()); break;
case Event:
switch (key.getEvent())
{
case CONFIG: _recv.showKeyboardConfig(); 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.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.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;
case Event: _recv.handle_event_key(key.getEvent()); break;
case Keyevent:
handleKeyUpWithModifier(key.getKeyevent(), mods);
break;
@@ -169,23 +147,9 @@ 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 switchInputMethod();
public void switchToPrevInputMethod();
public void setPane_emoji();
public void setPane_normal();
public void showKeyboardConfig();
public void set_layout(Layout l);
public void handle_event_key(KeyValue.Event ev);
public void set_shift_state(boolean state, boolean lock);
public InputConnection getCurrentInputConnection();
}

View File

@@ -39,17 +39,17 @@ class KeyModifier
case META: return turn_into_keyevent(k);
case FN: return apply_fn(k);
case SHIFT: return apply_shift(k);
case GRAVE: return apply_dead_char(k, '\u02CB');
case AIGU: return apply_dead_char(k, '\u00B4');
case CIRCONFLEXE: return apply_dead_char(k, '\u02C6');
case TILDE: return apply_dead_char(k, '\u02DC');
case CEDILLE: return apply_dead_char(k, '\u00B8');
case TREMA: return apply_dead_char(k, '\u00A8');
case CARON: return apply_dead_char(k, '\u02C7');
case RING: return apply_dead_char(k, '\u02DA');
case MACRON: return apply_dead_char(k, '\u00AF');
case OGONEK: return apply_dead_char(k, '\u02DB');
case DOT_ABOVE: return apply_dead_char(k, '\u02D9');
case GRAVE: return apply_map_or_dead_char(k, map_char_grave, '\u02CB');
case AIGU: return apply_map_or_dead_char(k, map_char_aigu, '\u00B4');
case CIRCONFLEXE: return apply_map_or_dead_char(k, map_char_circonflexe, '\u02C6');
case TILDE: return apply_map_or_dead_char(k, map_char_tilde, '\u02DC');
case CEDILLE: return apply_map_or_dead_char(k, map_char_cedille, '\u00B8');
case TREMA: return apply_map_or_dead_char(k, map_char_trema, '\u00A8');
case CARON: return apply_map_or_dead_char(k, map_char_caron, '\u02C7');
case RING: return apply_map_or_dead_char(k, map_char_ring, '\u02DA');
case MACRON: return apply_map_or_dead_char(k, map_char_macron, '\u00AF');
case OGONEK: return apply_map_or_dead_char(k, map_char_ogonek, '\u02DB');
case DOT_ABOVE: return apply_map_or_dead_char(k, map_char_dot_above, '\u02D9');
case BREVE: return apply_dead_char(k, '\u02D8');
case DOUBLE_AIGU: return apply_map_char(k, map_char_double_aigu);
case ORDINAL: return apply_map_char(k, map_char_ordinal);
@@ -107,6 +107,21 @@ class KeyModifier
}
}
/** Apply a [Map_char] or fallback to [apply_dead_char]. */
private static KeyValue apply_map_or_dead_char(KeyValue k, Map_char map, char dead_char)
{
switch (k.getKind())
{
case Char:
char kc = k.getChar();
char c = map.apply(kc);
if (kc == c)
return apply_dead_char(k, dead_char);
return k.withChar(c);
default: return k;
}
}
private static KeyValue apply_combining(KeyValue k, String combining)
{
switch (k.getKind())
@@ -459,6 +474,182 @@ class KeyModifier
}
}
private static final Map_char map_char_aigu =
new Map_char() {
public char apply(char c)
{
switch (c)
{
// Composite characters: 'j́'
case 'a': return 'á';
case 'e': return 'é';
case 'i': return 'í';
case 'l': return 'ĺ';
case 'o': return 'ó';
case 'r': return 'ŕ';
case 's': return 'ś';
case 'u': return 'ú';
case 'y': return 'ý';
default: return c;
}
}
};
private static final Map_char map_char_caron =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'c': return 'č';
case 'd': return 'ď';
case 'e': return 'ě';
case 'l': return 'ľ';
case 'n': return 'ň';
case 'r': return 'ř';
case 's': return 'š';
case 't': return 'ť';
case 'z': return 'ž';
default: return c;
}
}
};
private static final Map_char map_char_cedille =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'c': return 'ç';
case 's': return 'ş';
case 'g': return 'ģ';
default: return c;
}
}
};
private static final Map_char map_char_circonflexe =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'â';
case 'e': return 'ê';
case 'i': return 'î';
case 'o': return 'ô';
case 'u': return 'û';
default: return c;
}
}
};
private static final Map_char map_char_dot_above =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'ė': return 'ė';
default: return c;
}
}
};
private static final Map_char map_char_grave =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'à';
case 'e': return 'è';
case 'i': return 'ì';
case 'o': return 'ò';
case 'u': return 'ù';
default: return c;
}
}
};
private static final Map_char map_char_macron =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'ā';
case 'e': return 'ē';
case 'i': return 'ī';
case 'u': return 'ū';
default: return c;
}
}
};
private static final Map_char map_char_ogonek =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'ą';
case 'e': return 'ę';
case 'i': return 'į';
case 'k': return 'ķ';
case 'l': return 'ļ';
case 'n': return 'ņ';
case 'u': return 'ų';
default: return c;
}
}
};
private static final Map_char map_char_ring =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'å';
case 'u': return 'ů';
default: return c;
}
}
};
private static final Map_char map_char_tilde =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'ã';
case 'o': return 'õ';
case 'n': return 'ñ';
default: return c;
}
}
};
private static final Map_char map_char_trema =
new Map_char() {
public char apply(char c)
{
switch (c)
{
case 'a': return 'ä';
case 'e': return 'ë';
case 'i': return 'ï';
case 'o': return 'ö';
case 'u': return 'ü';
case 'y': return 'ÿ';
default: return c;
}
}
};
private static final Map_char map_char_double_aigu =
new Map_char() {
public char apply(char c)

View File

@@ -19,6 +19,7 @@ final class KeyValue
SWITCH_SECOND_BACK,
SWITCH_GREEKMATH,
CAPS_LOCK,
SWITCH_VOICE_TYPING,
}
// Must be evaluated in the reverse order of their values.
@@ -301,6 +302,14 @@ final class KeyValue
{
switch (name)
{
/* These symbols have special meaning when in `res/xml` and are escaped in
standard layouts. The backslash is not stripped when parsed from the
custom layout option. */
case "\\?": return fallbackMakeKey("?");
case "\\#": return fallbackMakeKey("#");
case "\\@": return fallbackMakeKey("@");
case "\\\\": return fallbackMakeKey("\\");
case "shift": return modifierKey(0x0A, Modifier.SHIFT, 0);
case "ctrl": return modifierKey("Ctrl", Modifier.CTRL, 0);
case "alt": return modifierKey("Alt", Modifier.ALT, 0);
@@ -343,6 +352,7 @@ final class KeyValue
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);
case "voice_typing": return eventKey(0x15, Event.SWITCH_VOICE_TYPING, FLAG_SMALLER_FONT);
case "esc": return keyeventKey("Esc", KeyEvent.KEYCODE_ESCAPE, FLAG_SMALLER_FONT);
case "enter": return keyeventKey(0x0E, KeyEvent.KEYCODE_ENTER, 0);
@@ -418,6 +428,9 @@ final class KeyValue
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);
/* intending/preventing ligature - supported by many scripts*/
case "zwj": return charKey("zwj", '\u200D', 0); // zero-width joiner (provides ligature)
case "zwnj": return charKey("zwnj", '\u200C', 0); // zero-width non joiner (prevents unintended ligature)
case "copy": return editingKey("copy", Editing.COPY);
case "paste": return editingKey("paste", Editing.PASTE);
@@ -451,6 +464,7 @@ final class KeyValue
/* Keys description is shown in the settings. */
addKeyDescr("capslock", "Caps lock");
addKeyDescr("switch_greekmath", "Greek & math symbols");
addKeyDescr("voice_typing", "Voice typing");
}
// Substitute for [assert], which has no effect on Android.

View File

@@ -9,16 +9,15 @@ import android.os.IBinder;
import android.text.InputType;
import android.util.Log;
import android.util.LogPrinter;
import android.view.ContextThemeWrapper;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.*;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import java.util.AbstractMap.SimpleEntry;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -34,9 +33,10 @@ public class Keyboard2 extends InputMethodService
// If not 'null', the layout to use instead of [_currentTextLayout].
private KeyboardData _currentSpecialLayout;
private Current_text_layout _currentTextLayout;
// Layout associated with the currently selected locale.
// Layout associated with the currently selected locale. Not 'null'.
private KeyboardData _localeTextLayout;
private ViewGroup _emojiPane = null;
public int actionId; // Action performed by the Action key.
private Config _config;
@@ -99,28 +99,18 @@ public class Keyboard2 extends InputMethodService
return Arrays.asList();
}
private void refreshSubtypeLayout(InputMethodSubtype subtype)
{
String s = subtype.getExtraValueOf("default_layout");
if (s != null)
_localeTextLayout = _config.layout_of_string(getResources(), s);
else
_localeTextLayout = KeyboardData.load(getResources(), R.xml.qwerty);
}
private void extra_keys_of_subtype(Set<KeyValue> dst, InputMethodSubtype subtype)
private void extra_keys_of_subtype(ExtraKeys dst, InputMethodSubtype subtype)
{
String extra_keys = subtype.getExtraValueOf("extra_keys");
String script = subtype.getExtraValueOf("script");
if (extra_keys == null)
return;
String[] ks = extra_keys.split("\\|");
for (int i = 0; i < ks.length; i++)
dst.add(KeyValue.getKeyByName(ks[i]));
dst.add_keys_for_script(script, ExtraKeys.parse_extra_keys(extra_keys));
}
private void refreshAccentsOption(InputMethodManager imm, InputMethodSubtype subtype)
{
HashSet<KeyValue> extra_keys = new HashSet<KeyValue>();
ExtraKeys extra_keys = new ExtraKeys();
List<InputMethodSubtype> enabled_subtypes = getEnabledSubtypes(imm);
switch (_config.accents)
{
@@ -141,42 +131,35 @@ public class Keyboard2 extends InputMethodService
_config.shouldOfferSwitchingToNextInputMethod = true;
}
private void refreshSubtypeLegacyFallback()
InputMethodManager get_imm()
{
// Fallback for the accents option: Only respect the "None" case
switch (_config.accents)
{
case 1: case 2: case 3: _config.extra_keys_subtype = null; break;
case 4: _config.extra_keys_subtype = new HashSet<KeyValue>(); break;
}
return (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
}
private void refreshSubtypeImm()
{
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
InputMethodManager imm = get_imm();
if (VERSION.SDK_INT < 28)
_config.shouldOfferSwitchingToNextInputMethod = true;
else
_config.shouldOfferSwitchingToNextInputMethod = shouldOfferSwitchingToNextInputMethod();
if (VERSION.SDK_INT < 12)
{
// Subtypes won't work well under API level 12 (getExtraValueOf)
refreshSubtypeLegacyFallback();
}
else
_config.shouldOfferVoiceTyping = (get_voice_typing_im(imm) != null);
KeyboardData default_layout = null;
_config.extra_keys_subtype = null;
if (VERSION.SDK_INT >= 12)
{
InputMethodSubtype subtype = imm.getCurrentInputMethodSubtype();
if (subtype == null)
if (subtype != null)
{
// On some rare cases, [subtype] is null.
refreshSubtypeLegacyFallback();
}
else
{
refreshSubtypeLayout(subtype);
String s = subtype.getExtraValueOf("default_layout");
if (s != null)
default_layout = _config.layout_of_string(getResources(), s);
refreshAccentsOption(imm, subtype);
}
}
if (default_layout == null)
default_layout = KeyboardData.load(getResources(), R.xml.latn_qwerty_us);
_localeTextLayout = default_layout;
if (_config.second_layout == null)
{
_config.shouldOfferSwitchingToSecond = false;
@@ -213,14 +196,14 @@ public class Keyboard2 extends InputMethodService
if (info.actionLabel != null)
{
_config.actionLabel = info.actionLabel.toString();
_keyeventhandler.actionId = info.actionId;
actionId = info.actionId;
_config.swapEnterActionKey = false;
}
else
{
int action = info.imeOptions & EditorInfo.IME_MASK_ACTION;
_config.actionLabel = actionLabel_of_imeAction(action); // Might be null
_keyeventhandler.actionId = action;
actionId = action;
_config.swapEnterActionKey =
(info.imeOptions & EditorInfo.IME_FLAG_NO_ENTER_ACTION) == 0;
}
@@ -242,6 +225,20 @@ public class Keyboard2 extends InputMethodService
_keyboardView.reset();
}
/** Returns the id and subtype of the voice typing IM. Returns [null] if none
is installed or if the feature is unsupported. */
SimpleEntry<String, InputMethodSubtype> get_voice_typing_im(InputMethodManager imm)
{
if (VERSION.SDK_INT < 11) // Due to InputMethodSubtype
return null;
for (InputMethodInfo im : imm.getEnabledInputMethodList())
for (InputMethodSubtype imst : imm.getEnabledInputMethodSubtypeList(im, true))
// Switch to the first IM that has a subtype of this mode
if (imst.getMode().equals("voice"))
return new SimpleEntry(im.getId(), imst);
return null;
}
private void log_editor_info(EditorInfo info)
{
LogPrinter p = new LogPrinter(Log.DEBUG, TAG);
@@ -288,6 +285,61 @@ public class Keyboard2 extends InputMethodService
if (parent != null && parent instanceof ViewGroup)
((ViewGroup)parent).removeView(v);
super.setInputView(v);
updateSoftInputWindowLayoutParams();
}
@Override
public void updateFullscreenMode() {
super.updateFullscreenMode();
updateSoftInputWindowLayoutParams();
}
private void updateSoftInputWindowLayoutParams() {
final Window window = getWindow().getWindow();
updateLayoutHeightOf(window, ViewGroup.LayoutParams.MATCH_PARENT);
final View inputArea = window.findViewById(android.R.id.inputArea);
updateLayoutHeightOf(
(View) inputArea.getParent(),
isFullscreenMode()
? ViewGroup.LayoutParams.MATCH_PARENT
: ViewGroup.LayoutParams.WRAP_CONTENT);
updateLayoutGravityOf((View) inputArea.getParent(), Gravity.BOTTOM);
}
private static void updateLayoutHeightOf(final Window window, final int layoutHeight) {
final WindowManager.LayoutParams params = window.getAttributes();
if (params != null && params.height != layoutHeight) {
params.height = layoutHeight;
window.setAttributes(params);
}
}
private static void updateLayoutHeightOf(final View view, final int layoutHeight) {
final ViewGroup.LayoutParams params = view.getLayoutParams();
if (params != null && params.height != layoutHeight) {
params.height = layoutHeight;
view.setLayoutParams(params);
}
}
private static void updateLayoutGravityOf(final View view, final int layoutGravity) {
final ViewGroup.LayoutParams lp = view.getLayoutParams();
if (lp instanceof LinearLayout.LayoutParams) {
final LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) lp;
if (params.gravity != layoutGravity) {
params.gravity = layoutGravity;
view.setLayoutParams(params);
}
} else if (lp instanceof FrameLayout.LayoutParams) {
final FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) lp;
if (params.gravity != layoutGravity) {
params.gravity = layoutGravity;
view.setLayoutParams(params);
}
}
}
@Override
@@ -329,33 +381,80 @@ public class Keyboard2 extends InputMethodService
/** Not static */
public class Receiver implements KeyEventHandler.IReceiver
{
public void switchInputMethod()
public void handle_event_key(KeyValue.Event ev)
{
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
}
public void switchToPrevInputMethod()
{
if (VERSION.SDK_INT < 28)
switch (ev)
{
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.switchToLastInputMethod(getConnectionToken());
case CONFIG:
Intent intent = new Intent(Keyboard2.this, SettingsActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
break;
case SWITCH_TEXT:
_currentSpecialLayout = null;
_keyboardView.setKeyboard(current_layout());
break;
case SWITCH_NUMERIC:
setSpecialLayout(_config.modify_numpad(loadLayout(R.xml.numeric)));
break;
case SWITCH_EMOJI:
if (_emojiPane == null)
_emojiPane = (ViewGroup)inflate_view(R.layout.emoji_pane);
setInputView(_emojiPane);
break;
case SWITCH_BACK_EMOJI:
setInputView(_keyboardView);
break;
case CHANGE_METHOD:
get_imm().showInputMethodPicker();
break;
case CHANGE_METHOD_PREV:
if (VERSION.SDK_INT < 28)
get_imm().switchToLastInputMethod(getConnectionToken());
else
switchToPreviousInputMethod();
break;
case ACTION:
InputConnection conn = getCurrentInputConnection();
if (conn != null)
conn.performEditorAction(actionId);
break;
case SWITCH_SECOND:
if (_config.second_layout != null)
setTextLayout(Current_text_layout.SECONDARY);
break;
case SWITCH_SECOND_BACK:
setTextLayout(Current_text_layout.PRIMARY);
break;
case SWITCH_GREEKMATH:
setSpecialLayout(_config.modify_numpad(loadLayout(R.xml.greekmath)));
break;
case CAPS_LOCK:
set_shift_state(true, true);
break;
case SWITCH_VOICE_TYPING:
SimpleEntry<String, InputMethodSubtype> im = get_voice_typing_im(get_imm());
if (im == null)
return;
// Best-effort. Good enough for triggering Google's voice typing.
if (VERSION.SDK_INT < 28)
switchInputMethod(im.getKey());
else
switchInputMethod(im.getKey(), im.getValue());
break;
}
else
Keyboard2.this.switchToPreviousInputMethod();
}
public void setPane_emoji()
{
if (_emojiPane == null)
_emojiPane = (ViewGroup)inflate_view(R.layout.emoji_pane);
setInputView(_emojiPane);
}
public void setPane_normal()
{
setInputView(_keyboardView);
}
public void set_shift_state(boolean state, boolean lock)
@@ -363,37 +462,6 @@ public class Keyboard2 extends InputMethodService
_keyboardView.set_shift_state(state, lock);
}
public void set_layout(KeyEventHandler.Layout l)
{
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()
{
Intent intent = new Intent(Keyboard2.this, SettingsActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
public InputConnection getCurrentInputConnection()
{
return Keyboard2.this.getCurrentInputConnection();

View File

@@ -10,7 +10,6 @@ import android.inputmethodservice.InputMethodService;
import android.os.Build.VERSION;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
@@ -123,6 +122,15 @@ public class Keyboard2View extends View
public KeyValue modifyKey(KeyValue k, Pointers.Modifiers mods)
{
if (_keyboard.modmap != null)
{
if (mods.has(KeyValue.Modifier.SHIFT))
{
KeyValue km = _keyboard.modmap.shift.get(k);
if (km != null)
return km;
}
}
return KeyModifier.modify(k, mods);
}
@@ -222,13 +230,7 @@ public class Keyboard2View extends View
private void vibrate()
{
if (!_config.vibrateEnabled)
return ;
if (VERSION.SDK_INT >= 5)
{
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
}
VibratorCompat.vibrate(this, _config.vibration_behavior);
}
@Override
@@ -372,7 +374,7 @@ public class Keyboard2View extends View
private void drawLabel(Canvas canvas, KeyValue kv, float x, float y, float keyH, boolean isKeyDown)
{
kv = KeyModifier.modify(kv, _mods);
kv = modifyKey(kv, _mods);
if (kv == null)
return;
float textSize = scaleTextSize(kv, _config.labelTextSize, keyH);
@@ -388,7 +390,7 @@ public class Keyboard2View extends View
{
Paint.Align a = LABEL_POSITION_H[sub_index];
Vertical v = LABEL_POSITION_V[sub_index];
kv = KeyModifier.modify(kv, _mods);
kv = modifyKey(kv, _mods);
if (kv == null)
return;
float textSize = scaleTextSize(kv, _config.sublabelTextSize, keyH);

View File

@@ -21,13 +21,17 @@ class KeyboardData
public final float keysWidth;
/** Total height of the keyboard. */
public final float keysHeight;
/** Might be null. */
public final Modmap modmap;
/** Might be null. */
public final String script;
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);
return new KeyboardData(rows_, keysWidth, modmap, script);
}
/** Add keys from the given iterator into the keyboard. Extra keys are added
@@ -47,7 +51,7 @@ class KeyboardData
for (int c = 1; c <= 4; c++)
addExtraKeys_to_row(rows, k, r, c);
}
return new KeyboardData(rows, keysWidth);
return new KeyboardData(rows, keysWidth, modmap, script);
}
public KeyboardData addNumPad()
@@ -70,14 +74,15 @@ class KeyboardData
}
extendedRows.add(new Row(keys, row.height, row.shift));
}
return new KeyboardData(extendedRows, compute_max_width(extendedRows));
return new
KeyboardData(extendedRows, compute_max_width(extendedRows), modmap, script);
}
public KeyboardData addNumberRow()
{
ArrayList<Row> rows_ = new ArrayList<Row>(this.rows);
rows_.add(0, number_row.updateWidth(keysWidth));
return new KeyboardData(rows_, keysWidth);
return new KeyboardData(rows_, keysWidth, modmap, script);
}
public Key findKeyWithValue(KeyValue kv)
@@ -99,7 +104,7 @@ class KeyboardData
private static void addExtraKeys_to_row(ArrayList<Row> rows, final Iterator<KeyValue> extra_keys, int row_i, final int d)
{
if (!extra_keys.hasNext())
if (!extra_keys.hasNext() || row_i >= rows.size())
return;
rows.set(row_i, rows.get(row_i).mapKeys(new MapKey(){
public Key apply(Key k) {
@@ -172,13 +177,27 @@ class KeyboardData
throw new Exception("Empty layout file");
boolean add_bottom_row = attribute_bool(parser, "bottom_row", true);
float specified_kw = attribute_float(parser, "width", 0f);
String script = parser.getAttributeValue(null, "script");
ArrayList<Row> rows = new ArrayList<Row>();
while (expect_tag(parser, "row"))
rows.add(Row.parse(parser));
Modmap modmap = null;
while (next_tag(parser))
{
switch (parser.getName())
{
case "row":
rows.add(Row.parse(parser));
break;
case "modmap":
modmap = Modmap.parse(parser);
break;
default:
throw new Exception("Unknown tag: " + parser.getName());
}
}
float kw = (specified_kw != 0f) ? specified_kw : compute_max_width(rows);
if (add_bottom_row)
rows.add(bottom_row.updateWidth(kw));
return new KeyboardData(rows, kw);
return new KeyboardData(rows, kw, modmap, script);
}
private static float compute_max_width(List<Row> rows)
@@ -196,12 +215,14 @@ class KeyboardData
return Row.parse(parser);
}
protected KeyboardData(List<Row> rows_, float kw)
protected KeyboardData(List<Row> rows_, float kw, Modmap mm, String sc)
{
float kh = 0.f;
for (Row r : rows_)
kh += r.height + r.shift;
rows = rows_;
modmap = mm;
script = sc;
keysWidth = kw;
keysHeight = kh;
}
@@ -415,10 +436,37 @@ class KeyboardData
}
}
public static class Modmap
{
public final Map<KeyValue, KeyValue> shift;
public Modmap(Map<KeyValue, KeyValue> s)
{
shift = s;
}
public static Modmap parse(XmlPullParser parser) throws Exception
{
HashMap<KeyValue, KeyValue> shift = new HashMap<KeyValue, KeyValue>();
while (expect_tag(parser, "shift"))
parse_mapping(parser, shift);
return new Modmap(shift);
}
private static void parse_mapping(XmlPullParser parser, Map<KeyValue, KeyValue> dst) throws Exception
{
KeyValue a = KeyValue.getKeyByName(parser.getAttributeValue(null, "a"));
KeyValue b = KeyValue.getKeyByName(parser.getAttributeValue(null, "b"));
while (parser.next() != XmlPullParser.END_TAG)
continue;
dst.put(a, b);
}
}
/** Parsing utils */
/** Returns [false] on [END_DOCUMENT] or [END_TAG], [true] otherwise. */
private static boolean expect_tag(XmlPullParser parser, String name) throws Exception
private static boolean next_tag(XmlPullParser parser) throws Exception
{
int status;
do
@@ -428,8 +476,16 @@ class KeyboardData
return false;
}
while (status != XmlPullParser.START_TAG);
return true;
}
/** Returns [false] on [END_DOCUMENT] or [END_TAG], [true] otherwise. */
private static boolean expect_tag(XmlPullParser parser, String name) throws Exception
{
if (!next_tag(parser))
return false;
if (!parser.getName().equals(name))
throw new Exception("Unknow tag: " + parser.getName());
throw new Exception("Unknown tag: " + parser.getName());
return true;
}

View File

@@ -37,6 +37,9 @@ public class LauncherActivity extends Activity
{
public boolean onUnhandledKeyEvent(View v, KeyEvent ev)
{
// Don't handle the back key
if (ev.getKeyCode() == KeyEvent.KEYCODE_BACK)
return false;
// Key release of modifiers would erase interesting data
if (KeyEvent.isModifierKey(ev.getKeyCode()))
return false;

View File

@@ -478,6 +478,10 @@ public final class Pointers implements Handler.Callback
public KeyValue.Modifier get(int i) { return _mods[_size - 1 - i]; }
public int size() { return _size; }
public boolean has(KeyValue.Modifier m)
{
return (Arrays.binarySearch(_mods, 0, _size, m) >= 0);
}
@Override
public int hashCode() { return Arrays.hashCode(_mods); }

View File

@@ -0,0 +1,81 @@
package juloo.keyboard2;
import android.content.Context;
import android.os.Build.VERSION;
import android.os.Vibrator;
import android.view.HapticFeedbackConstants;
import android.view.View;
public final class VibratorCompat
{
public static void vibrate(View v, VibrationBehavior b)
{
switch (b)
{
case DISABLED:
break;
case SYSTEM:
if (VERSION.SDK_INT >= 8)
v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP,
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
break;
case STRONG:
vibrator_vibrate(v, 60);
break;
case MEDIUM:
vibrator_vibrate(v, 30);
break;
case LIGHT:
vibrator_vibrate(v, 15);
break;
}
}
/** Use the older [Vibrator] when the newer API is not available or the user
wants more control. */
static void vibrator_vibrate(View v, int duration)
{
try
{
get_vibrator(v).vibrate(duration);
}
catch (Exception e) {}
}
static Vibrator vibrator_service = null;
static Vibrator get_vibrator(View v)
{
if (vibrator_service == null)
{
vibrator_service =
(Vibrator)v.getContext().getSystemService(Context.VIBRATOR_SERVICE);
}
return vibrator_service;
}
public static enum VibrationBehavior
{
DISABLED,
SYSTEM,
STRONG,
MEDIUM,
LIGHT;
VibrationBehavior() {}
/** Defaults [SYSTEM] for unrecognized strings. */
public static VibrationBehavior of_string(String s)
{
switch (s)
{
case "disabled": return DISABLED;
case "system": return SYSTEM;
case "strong": return STRONG;
case "medium": return MEDIUM;
case "light": return LIGHT;
default: return SYSTEM;
}
}
}
}

8
srcs/special_font/15.svg Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" standalone="no"?>
<!-- Google's Material Icons "Mic" (modified) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-10 0 1010 1000">
<path fill="currentColor"
d="M500 583.333q-51.875 0 -88.4375 -36.5625t-36.5625 -88.4375v-250q0 -51.875 36.5625 -88.4375t88.4375 -36.5625t88.4375 36.5625t36.5625 88.4375v250q0 51.875 -36.5625 88.4375t-88.4375 36.5625zM708.333 458.333h83.334q0 109.513 -71.6299 191.209
q-71.6289 81.6963 -178.37 97.125v128.333h-83.334v-128.333q-106.741 -15.4287 -178.37 -97.125q-71.6299 -81.6963 -71.6299 -191.209h83.334q0 86.25 61.042 147.292q61.041 61.042 147.291 61.042t147.291 -61.042q61.042 -61.042 61.042 -147.292z" />
</svg>

After

Width:  |  Height:  |  Size: 828 B

Some files were not shown because too many files have changed in this diff Show More