abouttreesummaryrefslogcommitdiff
path: root/srcs
AgeCommit message (Collapse)AuthorFilesLines
2023-08-16LayoutsPreference: Modify custom layoutJules Aguillon2-7/+25
Clicking on a custom layout opens a dialog for modifying the layout description instead of the dialog for selecting a layout.
2023-08-16Remove unused class LayoutListPreferenceJules Aguillon1-25/+0
This class is not used since the introduction of [LayoutsPreference].
2023-08-16ListGroupPreference: Fix change itemsJules Aguillon2-11/+18
[Preference.onClick] is apparently not called on [Item]s, though it is on [AddButton]. Workaround this by listening on click events on the view.
2023-08-16Allow multiple custom layoutsJules Aguillon3-54/+159
This merges the "Layouts" option with the "Custom layout" option. A custom layout becomes an item in the "Layouts" list among the other layouts. It's possible to add several custom layouts. Selecting the "Custom layout" item in the list opens a second dialog for entering the layout description. Layouts are serialized as JSON object and are decoded solely in the LayoutsPreference class.
2023-08-16CustomExtraKeysPreference: Reusable edit text layoutJules Aguillon2-6/+6
This layout is generically used by CustomExtraKeysPreference and LayoutsPreference.
2023-08-16ListGroupPreference.Serializer: Allow exceptionsJules Aguillon1-3/+9
(De)serializing might raise exceptions, which are handled by dropping the failing item.
2023-08-16ListGroupPreference: Make items abstractJules Aguillon3-35/+70
Allow items to be of any class instead of strings. Item serialization and deserialization methods are in a separate class because they are also used in a static context.
2023-08-07Add Superscript and Subscript letterssdrapha1-3/+39
2023-08-07Add superscript, subscript, ª and º to optional extrakeysRapha1-0/+8
And add description strings.
2023-08-07Don't elide label of non-string keysJules Aguillon1-1/+5
Several non-string keys can have a large label that shouldn't be elided, for example ctrl, meta, send. Also, change the cutoff to 3 characters as labels are easily colliding.
2023-08-06LayoutsPreference: Show layout display namesJules Aguillon1-4/+7
The internal name of layouts was rendered.
2023-08-06Describe editing keysJules Aguillon1-0/+10
The new strings are used in the "Add keys to the keyboard" option.
2023-08-06Add glyphs for editing keysJules Aguillon11-13/+41
All from Material Design Icons.
2023-08-06Elide custom keys labelsJules Aguillon2-2/+3
Make the font smaller for custom keys with a length above 1. Draw up to 4 characters on keys.
2023-08-06Don't replace user selected dead keysJules Aguillon2-5/+8
Don't replace dead-keys selected in the "Add keys to the keyboard" option by an alternative.
2023-08-06Remove the Accents optionJules Aguillon2-16/+4
This option makes less sense since per-script extra keys. It's also getting in the way of an eventual "dead-key or accented-letters" option.
2023-08-06Replace dead-keys when there's one alternativeJules Aguillon2-25/+58
The dead-key is replaced by its alternative if there's only one specified. Extra keys from every subtypes must be merged together to be able to make this check.
2023-08-06Extra keys alternativesJules Aguillon3-32/+75
For each extra key, a list of alternative can be specified. An extra key won't be added to the keyboard if all its alternatives are already present on it. This is useful to avoid having the dead key for an accent and the accented letters at the same time.
2023-08-05Modify arabic and persian numbers info function keysJules Aguillon1-2/+23
And add function keys placeholders in the layouts.
2023-08-05Translatable key descriptionsJules Aguillon2-23/+19
Key descriptions are shown in the "extra keys" option and can now be translated.
2023-08-02Settings: Increase vibration valuesJules Aguillon1-3/+3
2023-08-02font: Move glyphs into the PUAJules Aguillon3-41/+42
Glyphs in the Private Use Area at uE000 will no longer conflict with fallback fonts in the "extra keys" option.
2023-07-30ListGroupPreference: Allow to modify itemsJules Aguillon1-7/+25
2023-07-30Allow more than 2 layoutsJules Aguillon4-58/+126
The two layout selection options are replaced by a ListGroupPreference that allow to enter an arbitrary amount of layouts. The "switch_second" and "switch_second_back" keys are replaced by "switch_forward" and "switch_backward", which allow to cycle through the selected layouts in two directions. Layouts are changed to place these two key on the space bar. The backward key is not shown if there's only two layouts.
2023-07-30ListGroupPreference: Allow hide the "remove" buttonJules Aguillon1-9/+21
2023-07-30ListGroupPreference: Overrideable "add" buttonJules Aguillon1-2/+17
2023-07-29Refactor: Split out ListGroupPreferenceJules Aguillon3-144/+216
Split out the implementation of a string-list preference from CustomExtraKeysPreference. Allows to share the implementation with future preferences.
2023-07-29Add dagger, double dagger, section mark, and pilcrow as extra keys on ↵Ben Slusky2-0/+3
QWERTY-like layouts (#410) * Add section mark as an extra key in QWERTY-like layouts that don't have it already * Add dagger (also double dagger) as an extra key in QWERTY-like layouts
2023-07-29Add option to disable pin entry layoutJules Aguillon2-9/+18
The pin entry layout might be inferior for some usecases and people might be more used to the numeric layout.
2023-07-19Refactor: Centralize logging in a static classJules Aguillon3-18/+40
This new class will help write more logs. The LogPrinter is no longer created everytime the keyboard is opened. An error log is added if failing to load the custom extra keys.
2023-07-19Add custom extra keys preferenceJules Aguillon3-2/+181
This is a new section in the extra keys option that allows to enter arbitrary strings which are then added to the keyboard. A new string is needed for the title of the section, Android's icons and strings are used as much as possible to avoid adding more strings. Keys are stored in the preferences as a JSON array of strings.
2023-07-19Refactor: Make KeyValue.makeStringKey publicJules Aguillon1-9/+10
2023-07-19Refactor: Use a PreferenceCategory for extra keysJules Aguillon1-4/+2
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-09Refactor: Don't define extra keys in xmlJules Aguillon3-111/+137
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-09Add symbol ₴ to Fn+h and to UkrainianJules Aguillon1-0/+1
2023-07-05Remove use of `Arrays.copyOf`Jules Aguillon1-1/+2
The function has been added in API 9.
2023-07-02Updated/Added Czech translation + 2 common Fn keys (#387)Validbit1-0/+2
2023-06-28Accept some escaped keys in custom layoutsJules Aguillon1-0/+8
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-28Fix crash when the layout has less than 3 rowsJules Aguillon1-1/+1
2023-06-25Add hardcoded charmaps for most accentsJules Aguillon1-10/+174
`KeyCharacterMap.getDeadChar` may not be aware of the same dead keys in older version of Android. Hardcoded charmaps are more predictable.
2023-06-25Use generated arrays in Config.layout_of_stringJules Aguillon1-39/+23
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-25Standard layout names (#386)Jules Aguillon2-37/+37
The names are comprised of: script, layout name, country code. Co-authored-by: grim <verdastelo9604@hotmail.com>
2023-06-25Added Romanian layout and translations with special romanian characters (#358)Vasile Chelban1-0/+1
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-25Add Bengali Provat Layout (#357)Sabbir2-1/+5
* Add Bengali Provat Layout I added bengali_provat layout and renamed old bengali to actual layout name.
2023-06-24Per-script extra keysJules Aguillon3-29/+66
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-22Allow to specify a layout scriptJules Aguillon1-6/+10
Add the `script` attribute, which will be used to implement script-specific extra keys.
2023-06-10Fix `_localeTextLayout` null on API < 12Jules Aguillon2-14/+13
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-04Increase vibration valuesJules Aguillon1-3/+3
2023-06-04Add Kurdish Layout (#353)KuRa KuRd1-0/+1
Add Kurdish Keyboard Layout Qwerty Based Without Shift.
2023-06-04Explicitly map dead key for ñJules Aguillon1-1/+28
`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.