This adds a "GESTURE" modifier in KeyValue that materialize the gesture
into [Modifiers] and allow it to be applied at the same time as the
other modifiers, in the right order.
This moves the key modifying code back into Pointer to allow more
modifier manipulations.
This changes both the round trip and the clockwise circle gestures to
first apply Shift and if that didn't change the key, fallback to Fn.
This allows to have letters in the corner of keys while being able to
shift them. Clockwise circle modify keys the same way as round trip for
the center key.
The anti-clockwise gesture now do nothing. It's intended to make it
configurable per-layout.
This implements clockwise/anticlockwise circle and round trip gestures
inspired by Messagease.
The circle gestures start after a small threshold to avoid making the
regular swipe too hard to aim.
The gestures do:
- clockwise circle: Shift variant of the center symbol
- anticlockwise circle: Fn variant of the center symbol
- round trip: Fn variant of the targetted side symbol
The Gesture class now keep track of what the pointer is doing while it
moves on a key. It replaces the 'selected_direction' integer.
- Removing unused information (names and descriptions) from the Emoji class
- Creating a Gradle task that generates a more efficient res/raw/emojis.txt file from the most recent Unicode standard
- Saving recently used emoji preferences as emoji values rather than names
- Migrating old user preferences to the new system
* Hangul support
This works with two new kinds of keys (Hangul_initial and Hangul_medial)
that carry a precomposed hangul syllable and act as modifiers.
The hangul syllables are composed algorithmically.
* Add shift layer to Dubeolsik layout
* Make slider speed independent from swipe distance
Swipe distances other than the default resulted in a slider that were
not easy to control.
* refactor: Add class Pointers.Sliding
It holds the states and the code needed to make the slider work.
'Pointer.sliding' is set to [null] when sliding is not in progress.
The implementation is changed not to depend on [downX] and [dx] but
instead use the pointer's [x] coordinate directly.
* Move the cursor further for faster slides
In sliding mode, compute the speed of the pointer and use it to increase
at which the cursor moves.
* refactor: Separate kind for cursor movement keys
This allows to define a key that moves the cursor more than one position
at a time.
This will be used to avoid lag during fast slider movements.
* Reduce lag when sliding quickly on the spacebar
Avoid sending key events in a loop while sliding quickly in a cursor
movement key. Key of kind Cursor_move are "multiplied", meaning a single
key event represents a movement of more than one position, reducing the
number of key events sent.
This is only for cursor move keys.
Due to the modmap, the cache must be cleared when switching layout to or
from a layout that contain a modmap.
This is broken since 3f6b6fd23, which moves the modmap handling into
KeyModifier.
Thanks to the previous commit, a modifier key can now be more complex
than just a KeyValue.Modifier. This allows a more elegant implementation
of the compose key, that could be taken as a base for other features
(eg. unicode hex entry, hangul)
The COMPOSE_PENDING modifier is removed as keys of kind Compose_pending
can act as a modifier. This has the advantage of highlighting the key
that was last pressed in the sequence.
Rules are added to Pointers: Non-special but latchable keys must clear
latches and cannot be locked with a long press. These rules were not
needed before but were intended.
Allow keys of a kind other than Modifier to be a modifier.
This requires writing a compareTo function for KeyValue. Fields are
compared in this order: Kind, value, flags, symbol.
'FLAG_LOCKED' and 'FLAG_FAKE_PTR' are only used within Pointers.
Define new flags in Pointers and remove these from KeyValue. Also allows
to define new flags.
Shift locked via the "caps lock" key use the "fake pointer" mechanism
that is also used by auto-capitalisation.
Make sure that unlatching a fake pointer do not disabled a locked
modifier.
The implementation is moved into the Pointers class for a safer API and
easier implementation.
Themes do not dim secondary keys the same way due to the "offset"
mechanism. Instead, use a ratio that is the same for every themes.
It's still possible to override this ratio per theme.
The kind field wasn't large enough to hold the new Compose_pending kind.
The flags field is reduced in size by removing a free spot.
The FLAGS_BITS mask is defined in a safer way.
compile.py implements a parser for X11's Compose.pre files. A lot of
code is necessary to interpret character names but thanksfully, the name
of most characters is contained in the file.
The state machine is compiled into two char arrays which unfortunately
requires an expensive initialisation and allocation.
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 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".