Commit Graph

602 Commits

Author SHA1 Message Date
Jules Aguillon
6747669c2d Refactor: Use a PreferenceCategory for extra keys
This removes the need for a layout definition and adds a title before
the prefs.
It's a prerequise for the custom keys preference.
2023-07-19 23:30:58 +02:00
Reza Hosseinzadeh
1097b297d3
Improve the Persian layout (#397)
Change some characters' position
2023-07-17 19:33:09 +02:00
Jules Aguillon
4669192a01 Refactor: Don't define extra keys in xml
The current approach is hard to maintain, for example the last key
"autofill" was not displayed.

This implements a PreferenceGroup that contains the check boxes for
every extra keys without involving listing the preferences in
settings.xml.

A custom layout is used to remove the 'title' text view.
The list of extra keys is moved into the new class.
'ExtraKeyCheckBoxPreference' becomes a nested class.
2023-07-09 18:14:43 +02:00
Jules Aguillon
a2957a43d6 Add symbol ₴ to Fn+h and to Ukrainian 2023-07-09 16:12:13 +02:00
Jules Aguillon
37d4a523bb Remove use of Arrays.copyOf
The function has been added in API 9.
2023-07-05 18:58:27 +02:00
Validbit
ef4477d50c
Updated/Added Czech translation + 2 common Fn keys (#387) 2023-07-02 16:12:19 +02:00
Jules Aguillon
7f79bc358d Fix descriptions
Short description can't exceed 80 characters.
Removed trailing space.
2023-07-01 17:44:14 +02:00
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