The pin entry layout shouldn't be inverted as the letter indications
would be meaningless and the order would be opposite to what the option
specifies.
The enter and action key are swapped as the automatic swapping is also
removed.
Incompatible APIs were used in the custom layouts and the extra keys
options.
Add @TargetApi annotations to help catch similar issues in the future
with the help of 'gradle lint'.
Android 3.0 (API level 11) was released in Feb 2011.
These versions were already unsupported due to unavoidable calls to:
- MotionEvent.getActionMasked() (API 8)
And avoidable calls to:
- SharedPreferences.Editor.putStringSet() (API 11)
This allows to use modifiers in combination with other inputs like a
mouse click, for example under termux-x11.
The key down event and notification about modifiers changing are sent
down to KeyEventHandler. A mutable state remember for which modifier
down events have been sent.
When pressing down a modifier with one finger and typing with the
other, it might appear that the modifier is released after the first
time an other key is pressed and then pressed and released for the
following keys.
This prevents unintentionally type two modified keys instead of one
when the second key is pressed while the other is not yet released.
This separates the layout definitions from the special layouts
(bottom_row, greekmath) and other unrelated files (method, settings).
This is also a more intuitive location for layouts and make the resource
directory easier to navigate.
Under the hood, layouts are copied back into
build/generated-resources/xml.
Android's shouldOfferSwitchingToNextInputMethod() method might return
false when an other IME is installed, perhaps when the other IME doesn't
specify android:supportsSwitchingToNextInputMethod="true".
Tapping shift might call `Utils.capitalize_string` on some symbols
(notably custom keys), which crashes on empty string.
This also happens on builtin layouts with `key1="\"`.
This reverts commits ef03dfed5c and
ff01678ba6.
The "vibration duration" slider is bought back.
The "vibration enabled" option is replaced by "custom vibration", which switch between the system haptic feedback or the custom vibration.
The slider is greyed when "custom vibration" is unchecked and is
allowed to have a value of 0 to disable vibrations within the app.
The intermediate values "light", "medium" and "strong" are removed and
no migration of the setting is made.
Bring a popup for choosing the voice IME when the voice key is pressed
for the first time or the list of voice IMEs installed on the device
change.
A preference stores the last selected IME and the last seen list of
IMEs.
This reverts the Tusinian layout (1af4e45) and instead introduce a new
arabic PC layout with arabic numbers.
Layouts are renamed:
- arab_pc => arab_pc_hindu
- arab_pc_tn => arab_pc
This new attribute is now used instead of 'script' for modifying the
numpad according to the selected layout's script.
If not provided, it defaults to the value of 'script'.
Remember the selected layout in portrait and landscape mode
independently.
This allows to define a layout specific to landscape without having to
switch manually.
`method.xml` is now able to specify a preferred position for each extra
keys in term of an other key to which it should be placed nearby.
It's implemented for French as an example.
`KeyboardData.getKeys()` now returns a map of the keys present on the
layout to their position. Positions are the row, column and swipe
direction.
The computed map is cached in the KeyboardData object as it might be
accessed later by `findKeyWithValue`, which now do less work.
The initial capitalisation state given by the editor
(`info.initialCapsMode`) is always 0 in many editors.
For some text input types, update the state when typing starts,
disregarding the value given by `info.initialCapsMode`.
The numeric layout and the optional right hand side numpad are modified
to show the digits belonging to the script used in the current layout.
The numpads are still defined as it was before. The digits are changed
in `modify_numpad` if needed.
Implement the combinations that were previously not possible and were
commented out.
Also remove `apply_dead_char` and `apply_combining` and make all
dead-keys definitions uniform.
Change the API of `KeyModifier.Map_char` to allow returning a string
instead of a single 16 bits char.
This allows to return combining diacritics.
This also gets rid of `apply_map_or_dead_char`, maps can have their own
fallback.
The slider was repeatedly sending arrow keys, which change the focused
input when the end of a text box is hit.
A new key is added that implements cursor movements using the
`InputConnection` API.
The new keys are defined as `KeyValue.Editing`, which are no longer only
context menu actions.
The behavior when a selection has started is changed. The selection is
modified instead of cleared even when shift isn't pressed or the
selection would become empty.
Fallbacks to sending arrow keys for editors that do not support the API,
like Termux.
Settings defined with `get_dip_pref` had a wrong default value on first
launch.
The "right" default value was used after the shared preferences are
populated.
The new `layouts` preference replaces three previous preferences:
layout
second_layout
custom_layout
Add a preference migration function, which first migration is to
migrate layouts into the new preference.
The migration must also be called from the SettingsActivity as it might
use a different preference store due to the boot-aware preference copy.
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.
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.
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.
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.
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.
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.
* 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
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.
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.
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.
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.