[Xposed Framework Modules] Roughy:
Exi for Swiftkey 2.6.9 release

2.6.9 [25.04.2020 ] - Arrow key selection, bug fixes ( Stable: 7.5.3.5 Beta: 7.5.4.2 )

Changes in 2.6.9

Fixed

- Text being inserted when long-pressing to remove a prediction

- Prediction insertion in flow failing sometimes ( probably significant performance impact )

Added

- text selection using mod + arrow keys

Changed

- Updated translations ( Russian, Brazilian-Portuguese )

The Xposed Installer app does not appear to be refreshing properly and may not list the latest version.

Please download it directly from the Xposed Repository below using a browser.

Download:

Exi for Swiftkey on Xposed module repository

My own mirror of all versions

Notes:

Text inserted when removing prediction [MENTION=4176944]Gruber008[/MENTION] [MENTION=1759876]n0j0e[/MENTION] [MENTION=3213471]ahb83[/MENTION] [MENTION=2523916]danbest82[/MENTION]

See the release post of the previous release for details, but tl;dr custom popups with longer strings go a bit wonky sometimes so we intercept and insert them manually. Apparently the predictions in the toolbar are built on the same "key" class as the rest of the keyboard, and our best-guess approach to figuring out what is what categorized them as popup keys.

Solved by only applying that behavior to keys where we have definitely added custom popups.

Select text with arrow keys [MENTION=9588899]Starnia[/MENTION]

Hitting Swiftkey's arrow keys while holding down the mod key will now select text, just like an actual keyboard would while holding down shift.

Remember that the mod ( modification ) key is configurable under settings, and you can set it to use shift, or space, or whatever instead. You can even use all of them at the same time!

This was originally going to be implemented as a text action, along with all the other hotkeys, but then it would be a one-time thing and you wouldn't get any special behavior when you keep pressing the key.

Luckily Swiftkey doesn't do anything special here, and here simply dispatching dpad direction key events in response to the arrow keys being hit.

We do the the same thing when we want to move the cursor vertically, dispatching shift down -> arrow key down -> arrow key up -> shift key up.

Look for a dpad event when modifier key is down, replace with our own even that includes the shift key.

Behavior beyond this is up to Android, and behaves pretty much the same as it would on a PC with a real keyboard.

This feature is enabled by default. I can't imagine that anyone is going to accidentally activate this, but I have been wrong before.

On another note, the arrow keys in Swiftkey don't actually trigger until you release the button, unlike an actual keyboard where it will trigger immediately upon the button being lowered.

I could totally change this, but somehow I doubt anyone cares.

Translations

Translations!

As always [MENTION=8536001]alex_long[/MENTION] and [MENTION=6204033]K0media[/MENTION] are on top of things, and the Brazilian-Portuguese and Russian translations have been updated with most ( if not all ) the missing strings. Thanks!

Prediction insertion during flow

Inserting predictions is a surprisingly massive pain.

There are many reasons for this, but one of them is that despite us inserting our inserted predictions into the last list of predictions displayed to the user, there is a separate "get top prediction" method that runs the entire process from scratch, and we have to make sure anything we insert as the primary prediction is returned here.

This used to be in the same class as most of the other prediction stuff, but has now been moved elsewhere, and needed a quick fix.

If you are still using stable ( 2.5.3.5 ) then this will not have affected you at all, but in beta ( 2.5.4.2 ) it will likely have degraded performance a bit, even if you were not using flow input.