| Age | Commit message (Collapse) | Author | Files | Lines |
|
The "Switch to the last used keyboard" is renamed to "Switching between
input methods" and allows to select "Switch to last used", which was the
default in older releases.
|
|
* Refactor: Split DeviceLocales out of Keyboard2
This moves the code from Keyboard2 that handles the active IME subtypes
and the current one.
The goal is to access this information from the dictionary activity
while simplifying the code of Keyboard2.
* Refresh the candidates view when subtype changes
This fixes the status message being inconsistently shown.
* Refactor: Load DeviceLocales less often
Previously, [DeviceLocales.load()] was called everytime the keyboard was
shown on the screen. This operation is moderately costly and only need
to be done when the IME subtype changes.
* EditorConfig: Fix crash on Android 9
|
|
The `CurrentlyTypedWord` class tracks the word that is being typed. It's
implemented on the same model as Autocapitalisation and avoid expensive
IPC calls when possible.
The `Suggestions` class is where the suggestion lookup should go. It
currently just echoes the current word.
|
|
The `CandidatesView` is implemented as a `LinearLayout` that is divided
horizontally with up to 3 `TextView`. It might in the future contain
buttons on the sides.
The candidate view is nested into the input view rather than using
Android's `setCandidatesView` and callbacks as the API is unreliable and
complicated.
The first suggestion goes in the middle to be more accessible. The
second suggestion goes on the right to be more accessible to the
right-handed, because it must go somewhere.
|
|
|
|
* Disable selection mode in text editors
Selection mode removes the space bar key (which is replaced by the Esc
key) and can be annoying in Emacs for example.
Text editor users probably have the `esc` key available.
* Refactor: Move EditorInfo related code to EditorConfig
Add the new EditorConfig class that handles configuration extracted from
the EditorInfo. It is accessible from the Config class for convenience.
This aims at reducing the length of already large classes and group the
code that was spread over several classes.
|
|
|
|
|
|
This fixes the unwanted margin at the bottom of the screen on
Samsung One UI 7 based on Android 15.
|
|
* Add AndroidX WindowManager
unfortunately, this seems to be the only way to get fold state, native Android APIs are internal. To add this, we need to update some dependencies, raise java version and raise compile SDK.
* adds separate layouts and separate layout settings for folded and unfolded state of the device.
The affected settings are:
+ the margin bottom settings
+ the horizontal margin settings
+ the keyboard height settings
* Update shell.nix
|
|
* Selection mode: Space to cancel the selection
This adds the "selection mode", which is activated when text is selected
in the text box. The selection mode is exited when the selection is
cleared.
While the selection mode is activated, the Space and Esc keys are
modified into the "selection cancel" key, which remove the selection
without changing the text.
The space bar is otherwise easy to type by accident during a selection
and causes the selected text to be deleted.
* Selection mode: Move each ends of selection separately with slider
When the selection mode is activated, the space bar sliders change how
they affect the selection:
- The left side of the slider moves the left position of the selection.
To shrink the selection from the left side, the slider must be
activated by sliding to the left, extending the selection
temporarilly, then by sliding to the right.
- The right side of the slider affects the right position if the
selection.
|
|
* Construct a single handler
* Add a delay after a Keyevent key in a macro
Add a delay before sending the next key to avoid race conditions causing
keys to be handled in the wrong order. Notably, KeyEvent keys handling
is scheduled differently than the other edit functions.
|
|
On API 30 to 34, the status bar changes color when the keyboard appears
and disappears. A ghost of the changed status bar is animated by the
same animation used for the keyboard, which is unexpected.
|
|
Layout modifying functions are removed from Config to LayoutModifier as
static classes.
The two classes are (weakly) mutually dependent, the refactoring is
purely for the purpose of making shorter classes.
The only change is that 'modify_numpad' is changed to remove duplicated
code. This has the side effect of making the "double tap for caps lock"
option affect the shift key in the numpad.
|
|
The keyboard background now extends under the system bars and display
cutout on Android 15 but the keys do not.
The back and IME switching buttons that appear in the navigation bar require
special care to not overlap with the keyboard.
The launcher and settings activity are also fixed.
|
|
This only affected Android 12 and up.
|
|
The call to getLanguageTag() introduced in 4629410 requires API 24.
|
|
The arabic layout was used as the default on devices where all the
installed languages are not supported by the keyboard. This is not
intended.
This is probably caused by 'getCurrentInputMethodSubtype' returning the
first layout in the list of disabled subtypes in alphabetical or
language tag order.
Re-ordering the subtypes in method.xml had no effect.
Setting 'overridesImplicitlyEnabledSubtype' in method.xml has no
measured effect.
|
|
This adds the clipboard pane, which allows to save an arbitrary number of
clipboards and to paste them later. The key can be disabled in settings.
Checking the "Recently copied text" checkbox will cause the keyboard to keep a
temporary history of copied text. This history can only contain 3 elements
which expire after 5 minutes.
If this is unchecked, no history is collected.
History entries can be pinned into the persisted list of pins.
|
|
This doesn't seem necessary and won't play well with eventual keys that
change the configuration.
|
|
This happen when opening the settings from the launcher activity without
ever opening the keyboard.
To remove this bug entirely, the KeyboardData.init method is removed,
the pieces needing initialization are now cached in Config.
|
|
The COMPOSE_PENDING modifier indicate whether a compose sequence is in
progress. The new key of kind Compose_pending sets the current state of
the sequence.
The compose sequences are compiled into a state machine by a python
script into a compact encoding.
The state of the pending compose is determined by the index of a state.
|
|
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's shouldOfferSwitchingToNextInputMethod() method might return
false when an other IME is installed, perhaps when the other IME doesn't
specify android:supportsSwitchingToNextInputMethod="true".
|
|
This is warranted by the API.
|
|
The keys are not renamed to retain compatibility.
|
|
|
|
|
|
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 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'.
|
|
This wasn't intended and was caused by the "current_layout_unmodified"
optimisation.
|
|
Remember the selected layout in portrait and landscape mode
independently.
This allows to define a layout specific to landscape without having to
switch manually.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
The pin entry layout might be inferior for some usecases and people
might be more used to the numeric layout.
|
|
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.
|
|
The names are comprised of: script, layout name, country code.
Co-authored-by: grim <verdastelo9604@hotmail.com>
|
|
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.
|
|
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.
|
|
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.
|
|
Implemented similarly to the IM switching 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.
|
|
Set keyboard bottom gravity and adjust inputArea height so it doesn't appear on top in fullscreen.
|