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.
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.
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
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.
`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.
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`.
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.
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.
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").
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>
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.
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.
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.
'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.
The 'keysHeight' field needs to be updated. As this class is not
intended to be mutable, copy the list of rows and call the constructor.
Also remove an unecessary component of the keyboard height calculation.
A new option changes the "change_method" into the new
"change_method_prev". It switch to the previously used input method.
A long press on "change_method_prev" sends "change_method".
A new section is added in the settings and existing options are moved.
Refactor, follow up of 90b7944. Add a modification step to the "special"
layouts: numpad, greekmath, pin entry.
Remove the apply_key0 function, which is not expressive enough.
Add an enum instead of yet an other "switch_" function.
Send key events for the left or right arrow as the finger slides on the
space bar.
Can be used to select text by holding shift. Works under Termux.
Events are sent linearly as the finger travels. The distance between
each events is defined from the swiping distance divided by 4.
'slider="true"' can be set on a key that have 'edgekeys="true"'.
'key2' and 'key3' represent the right and left keys.
It allowed to modulate the repeat speed of some keys (arrow, backspace,
delete) by move the finger farther or closer to the key.
In practice, this wasn't pratical and doesn't seem popular. It is
removed in favor of a better mechanism for moving the cursor.
Stay on the secondary layout after a config refresh or onStartInputView.
The information is kept until the keyboard is restarted.
Additionally, move tweaking the secondary layout to the Config class now
that physical equality is not needed.
Values like 'characterSize' and 'horizontalMargin' can't be fed back into the default value because they are not of the same unit.
To avoid this happening again, change the way the default value is defined for every options.
The 'key_height' dimension was no longer used.
The most requested keys are undo and redo. Unfortunatly redo doesn't
work reliably.
The other context menu actions like share, assist and autofill are added
even thought they are rarely useful or implemented.
* Add option for keyboard opacity (transparency). Keyboard background, keys and pressed keys can be adjusted separately.
* Make the borders transparent as well
* Moved setAlphas outside drawKeyFrame to top of onDraw method
setInputView() was not called when the view was re-created through
refresh_config(). Also, the refresh_config() function was not able to
properly set the current layout.
Now keep the default layout (_localeTextLayout) and the current non-text
layout (if any, _currentSpecialLayout) separately to be able to refresh
them later.
setInputView() is called everytime the view is created instead of by
onStartInputView() specifically.
The setting activity now save the preferences to the protected storage
in onStop() instead of listening for onSharedPreferenceChanged.
The callback might not be called if the "default" shared preferences is
different from the shared preferences actually used. This is unexpected
but seems to happen half of the time on Android 12.
Since f1ce6ab, this callback is critical to update the keyboard.
Restarting the application can no longer solve these issues.
Add an option for specifying an XML layout description as a string.
The option is a bit rough at the moment:
- No documentation, users have to be aware of the keyboard's code to use
this option.
- No error are shown, the layout will fallback to qwerty on error.
This function has been introduced in API 19 and deprecated in API 28.
There was no version check for API 19 but instead of adding these,
simply remove the feature for API under 28.
Themes can define the color of each borders independently. Every borders
must have the same width for now. It's possible to set a different width
when the key is activated, thought this is only used to remove borders.
The 4 themes are updated to take advantage of borders.
Remove the code dealing with InputMethodConnection from 'Keyboard2' and
move it into 'KeyEventHandler', where more editing actions can now be
implemented.
Autocapitalisation is also moved, the IReceiver interface is simplified.
The dpi values "xdpi" and "ydpi" can have wildly different values on
different devices.
The new computation defines a baseline and only take into account the
dpi values as a ratio.
On a 480dpi screen (in both directions), this decrease the value by
about 18%. This new distance felt better during testing.
A new option allow to choose a secondary layout, the switching key is
placed on the top edge of the space bar.
The "Programming layout" option was basically doing that but it was
possible to choose from a few layouts only. It is improved and renamed.
The 'LayoutListPreference' allows setting the string for the first entry
but otherwise share the rest of the array.
Add nice icons from materialdesignicons.
Store preferences in device protected storage, which is available before
the device is unlocked.
The keyboard was crashing when trying to access the encrypted
preferences.
The emoji pane uses a separate preferences file, the old data is lost.
The SettingsActivity can't easily use the new preferences storage.
Instead, it continues to use the "default" preferences store, which is
copied back to the protected storage when needed.
The 'accent_slash' was missing in the extra keys setting.
Allow to type more latin letters "with oblique stroke" or "with stroke"
that visually have an oblique bar, that were not added to 'accent_bar'.
There seems to be no "DayNight" theme compatible with older version of
android outside of the androidx library.
Using 'Theme.DeviceDefault' which is a dark theme, even if it doesn't
sounds like. Detect if a light theme should be used at activity
creation.
Similar to 'qwertz' but is wider to show äöü on dedicated keys. Some
punctuations are rebalanced to use the space better.
The default layout for de_DE is changed.
The key enable caps lock immediately. It does nothing if caps lock is
already enabled.
It is not present on the keyboard by default but a place is defined on
every layout, top-right of the shift key. It can be enabled in the
settings.
The icon is from materialdesignicons.com.
This mode is annoying to some users and is disabled in most text views.
The keyboard has a fixed sized relative to the height of the screen in
landscape mode. The keyboard can't take more space than expected,
currently.
This might cause problems in the future and might be hidden behind an
option if one is found. Every text views so far seemed to behave fine.
In Turkish, upper case of 'iı' is 'İI' but Java's toUpperCase will
return 'II'.
To make 'İ' accessible, make it the shift of 'ı'. This has the
inconvenient of swapping i and ı on the keyboard.
* Added Czech translation and layout
Translated keyboard and created Czech multilingual "practical" layout for faster typing and typing in commonly used languages (German, Slovak + French w/accents)
* Update (Rephrase) full_description.txt
... to better suit the language and naturally promote keyboard's features and possibilities to a wider audience.
The Fn+switch_numeric shortcut might be hard to discover or too slow for
heavy users.
A location is allocated for the key so it has a consistent placement.
Allows to add more keys to the keyboard from a predefined list.
The implementation doesn't use MultiSelectListPreference because it
doesn't seem possible to change the item layout to properly show the
rendered symbols.
Change the capitalisation algorithm to use Android's
'getCursorCapsMode'. This requires a bit of cursor calculations but
should feel more standard.
The auto completion only triggers after a space is typed or backspace is
pressed.
Modifiers can be locked with a long press. The key repeat mechanism is re-used
and the press timeout is the same.
Every modifiers can be locked that way, not only the "lockable" ones.
The previous behavior can be enabled in the settings (for shift only)
but the default is changed.