abouttreesummaryrefslogcommitdiff
path: root/srcs
AgeCommit message (Collapse)AuthorFilesLines
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.
2023-06-03Add automated checks on layoutsJules Aguillon1-3/+3
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-03Refactor: Remove dimens used as option defaultsJules Aguillon1-13/+8
The conversion into px was done twice, leading to wrong values.
2023-06-03Refactor: Handle Event keys in Keyboard2Jules Aguillon2-100/+71
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-03Hide the voice typing key if no suitable IMJules Aguillon2-19/+30
Implemented similarly to the IM switching key.
2023-06-03Add Voice Typing keyJules Aguillon6-0/+38
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-03More control over vibrationJules Aguillon3-10/+85
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-03Launcher activity: Don't handle the back buttonJules Aguillon1-0/+3
2023-06-03Per-layout shift modmapJules Aguillon3-12/+77
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-05-24Fix gravity of keyboard in full screen (#363)vladgba1-5/+58
Set keyboard bottom gravity and adjust inputArea height so it doesn't appear on top in fullscreen.
2023-04-23Pull request to add new layout Persian (#342)Reza Hosseinzadeh1-0/+1
* Add persian layout * Change layoutId_of_string to layout_of_string * Add translation for Persian
2023-04-10Launcher activity: Fix crash on API < 28Jules Aguillon1-7/+4
2023-04-10Do not lock modifiers if sliding a keydoak1-0/+1
This unconditionally removes all pointers (touches) pressing modifiers which are not already locked, avoiding that the (currently) latched modifier will be locked aventually. This can be verfified while sliding the space bar to move the cursor left or right. Closes #319.
2023-04-02Launcher activity: Input boxJules Aguillon1-0/+32
For trying the keyboard without having to mess with an other app.
2023-03-28Refactor: Remove unecessary method KeyboardData.load_pin_entryJules Aguillon2-9/+1
2023-03-28Add a launchable explanatory activityJules Aguillon1-0/+26
This activity points to the system settings page for enabling input methods. This is purely a shortcut but is expected by many users. It could be made more useful in the future or hidden whenever the keyboard is enabled.
2023-03-13Correct pointer directionJules Aguillon1-3/+5
The previous algorithm did not cut the circle into 16 equal parts. The division by 2pi yielded numbers smaller than 16, which no longer made sense after the cast to int.
2023-03-11Add Arabic layout (#314)Mostafa Ayesh1-0/+2
* add arabic keyboard * use unicode values for special characters * add alternate layout * use arabic numbers
2023-03-11New Hindi layout (#313)Luke Videckis2-1/+58
* New Hindi layout * Update default layout for Marathi, Nepali * Consistent naming for Devanagari layouts
2023-03-05Refactor: Remove KeyboardData.CornerJules Aguillon3-104/+77
The Corner class is removed. The "localized" flag for all the corners is held in a bitfield.
2023-03-05Remove the 'edgekeys' attributeJules Aguillon1-33/+0
2023-03-03Allow 8 symbols per keyJules Aguillon4-164/+145
'Keyboard.Key' now contains an array of size 9, giving each keyvalue an index. The algorithm for finding the nearest key during a swipe now needs 16 segments, which are now calculated as an angle. The algorithm does one more interation instead of 2 more, slightly reducing the sensitivity of corner values. The 'getAtDirection' function is moved into the Pointers class to clearly separate the two systems. The 'edgekey' attribute is now obsolete but is kept for compatibility. The flag is removed internally, key index are simply translated. Similarly, the 'slider' attribute now act on keys at index 5 and 6 instead of 2 and 3.
2023-03-02Fix caps lock stopped by auto-capitalisationJules Aguillon2-3/+20
Auto-capitalisation triggers when the backspace key is used. Make sure to not remove a locked shift pointer.