yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] Roughy:
Exi for Swiftkey 1.5.4 release

1.5.4 [ 21.07.2018 ] - Can disable vertical swipe, fix full-screen / oreo crash ( Stable: 7.0.9.28, Beta: 7.1.0.17 )

Changes in 1.5.4 ( Stable: 7.0.9.28, Beta: 7.1.0.17 ):

[Release Post]

Fixed

- Immediate crash on Oreo devices ( Async setup disabled to fix )

- Disable full-screen mode not working correctly

Added

- Option to disable vertical cusor movement when swiping

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

Notes:

Oreo crash fix [MENTION=7830895]MBDdk[/MENTION] [MENTION=882753]L22EEW[/MENTION] @Alexey71 [MENTION=7391069]param.pjsl[/MENTION]

We do a lot of work the first time the module is loaded, and after every update of the module or Swiftkey.

Most of this work needs to be done before Swiftkey does anything else. This is bad, since it will freeze up for a while.

Async hooks were the solution, where we perform the important work first, and do the rest later so Swiftkey doesn't have to freeze.

Unfortunately a bug in Xposed that appeared after Oreo results in Android occasionally throwing a fit and crashing everything.

The solution then is to disable the new fancy async setup for Oreo and later.

The problem with this is that starting with Android P, any app that locks up will just be forced to crash instead.

Luckily there will also be a "Display App Not Responding dialog" that you can enable somewhere, so you will just have to enable that I guess.

Full-screen mode [MENTION=7774486]pratyush28[/MENTION]

The keyboard service has a method that the system calls with some information to ask the keyboard if it wants to enter full-screen mode.

This method is also responsible for setting a value that is returned when the system (and other components) call isFullscreen(). Apparently this value was still getting set somehow,

and we ended up in a fullscreen-but-not-fullscreen mode. Hooking isFullscreen() to also always return false seems to have sorted that.

Disable vertical cursor movement when swiping [MENTION=4367230]sbcontt[/MENTION]

If you find yourself accidentally triggering vertical cursor movement, there is now an option to disable this so it will only move horizontally.

In my ongoing quest to not bother the translators, this has been implemented as a toggle-button above the Swipe Mode section:

By default it is set to allow cursor movement in any direction, denoted by a multi-direction arrow:

Tap it and it will switch to a left-right arrow symbol, denoting that the cursor will only move left or right (horizontally):
[Xposed Framework Modules] sbcontt:
Thank you very much for the update. Vertical movement was the reason behind 100% of my spacebar misses. Glad I could help in the improvement of this program.

I have been thinking, is it possible to override Swiftkey's gestures using Xposed? Fleksy has a rad gesture deletion system where you can "hold" the gesture to continue deleting multiple words in one go. Swiftkey only ever deletes one word per gesture. When you get the spare time, may I attract you to give that feature a consideration?

The cursor control you have managed is far superior to that of Fleksy though. In Fleksy you can only have either Num row or cursor control... but you managed to integrate cursor control into Num row :) On top of that, Exi's cursor control can be configured. This is way higher in quality than what paid developers are doing.
[Xposed Framework Modules] Pariah24:
Thanks, I get it now, although it doesn't work right for me on most attempts.
[Xposed Framework Modules] g3or63126:
Thanks for a wonderful app.

I have a feature request. Is it possible to add swipe down action to cycle through punctuation marks like it's implemented in Fleksy keyboard? It's a killer feature for me, I'd even pay for this.
[Xposed Framework Modules] Roughy:
Hmmmmm, that is pretty neat.

Cycling through punctuation marks seems to be an extension of cycling through suggestions.

Unlike Fleksy, Swiftkey does not suggest alternate punctuation. These can be inserted, though.

The main difficult would be tying switching between the suggestions without committing into the UI. Unlike Fleksy, a lot of Swiftkey themes draw "boxes" around the suggestions, so moving around and centering them as you swipe up/down would would incredibly wonky, not to mention dealing with how they are displayed in languages such as Japanese and Chinese.

These design issues aside though, most of the work required to do this is already in place in the form of swipe selection ( adding additional vertical gestures would be simple) and Additional Suggestions ( We're already hijacking and redrawing the suggestions view).

I probably won't get to it anytime soon though; my schedule is fairly swamped.
[Xposed Framework Modules] larov123:
How can I hide "No keyboard language is set..select language" window ? its posibble ?
[Xposed Framework Modules] Kucher:
Is it possible to make this selection permanent and don't repeat all manipulations after every reboot?
[Xposed Framework Modules] Roughy:
Probably, the question is why you would want to!

I'm guessing this is a move to get rid of the suggestions bar?

I was under the impression that this was a one-time thing, making it near impossible to debug.

But it would appear you are correct, it does get reset again after a reboot (or multiple reboots? not sure).

In any case, that makes it repeatable and therefore fixable. I shall be getting to that soonish.
[Xposed Framework Modules] Kucher:
Thank you!
[Xposed Framework Modules] oroboros74:
Any chance of getting to Exi settings directly from the keyboard? Even simply adding an icon or something somewhere?
[Xposed Framework Modules] it's pointless:
This module soft-reboots a couple of 5.1 phones I have tested it on.

The thing is, the reason I need it is because there are many emoji not available on Swiftkey even though they are included in the notocoloremoji.tff font I updated manually.

When Exi is enabled, all emoji are available (no need to add new panels).

I have come to depend on a few emoji that I was using on Whatsapp, but Facebook is about to start mass spying on Whatsapp users so I have switched to other apps.

How could I make Swiftkey aware that the font has been updated and supports many more emoji? (I tried completely uninstalling SK and installing again, tried TB backups from phone with Exi enabled... )
[Xposed Framework Modules] Roughy:
Uhhhh, I'll maybe look into that, along with the other bits and bobs in few days.

Almost finished wrapping up work on another project and I'll take some time to sort out projects I've been neglecting.

Bootloops are... not good.

The module itself should not be able to crash the system server (cause bootloop), so it is likely an xposed bug.

Depending on the cause we may be able to work around it.

Stacktrace of system server crash wanted. I'll dig up some lollipop devices and see if I can reproduce it in the morning.

It's been a while since I looked at Swiftkey's emoji internals, but I believe it still manually checks what version of android you're on and decides what emoji to provide based on that.

Exi does not simply modify the list of emoji available, it completely replaces the emoji panel. Without the module activated Swiftkey will use its own Emoji panel, with its pre-determined selection on emoji.

Edit: Unable to reproduce. I will be needing logcat output of the system server crash to get to the bottom of that.
[Xposed Framework Modules] pratyush28:
Exi not working for 7.1.2.20 beta waiting for update thx!
[Xposed Framework Modules] n0j0e:
For OP, latest stable SwiftKey is 7.1.1.26!

Sent with much love & Android. OnePlus 5T
[Xposed Framework Modules] Kucher:
Now, this function doesn't work completely. I have tried to toggle it as usual but without success.

After uninstalling of version 1.6.0 and returning back on 1.5.4 toggle is working.

SwiftKey Stable 7.1.1.26, Android 6.0
[Xposed Framework Modules] Roughy:
I thought I mentioned it enough places.

This update targets 7.1.2.20, the current version of Swiftkey Beta.

See the compatibility bit for details, but basically there were too many changes to maintain backwards compatibility, meaning Swiftkey (not beta) will not be compatible until the next time it receives and update. If you're using it with 7.1.1.26, the latest version of this module won't work at all.
[Xposed Framework Modules] Kucher:
Thank you for explanation> but it is better clearly write that version 1.6.0 of module works now ONLY on SwiftKey keyboard version 7.1.2.20 Beta.
[Xposed Framework Modules] oroboros74:
I just realized that thanks to your note here after having installed the update.

So does this mean from now on to use Exi we should be not on the stable but the beta version? Or is it just for this time?
[Xposed Framework Modules] Alexey71:
delete post
[Xposed Framework Modules] Roughy:
Stable and Beta are actually the same thing, stable just tends to lag behind a minor version or two.

Sometimes stable is newer. Basically try new things in beta -> fix problems -> try new things in beta while also releasing fixed stuff as stable.

Assuming all the major changes were introduced in 7.1.2.0, the next stable release should be compatible, unless they decide to do a tiny incremental update instead.
[Xposed Framework Modules] XtraWater:
Thanks man. The update works fine.
[Xposed Framework Modules] rolear8:
Thank you! Seems the emojis are now showing on the recent panel with no issues, will keep testing and let you know if anything master ?
[Xposed Framework Modules] Kucher:
After the update of stable SwiftKey to version 7.1.2.21, the function of no space after punctuation marks in module v. 1.6.0 works after reboot!

You need to uncheck module in Xposed, reboot, uninstall the old version, rebut, install v. 1.6.0, check module in Xposed, reboot. Profit!
[Xposed Framework Modules] n0j0e:
Is the swipe over top number row = cursor left/right also working with your version setup?

Sent with much love & Android. OnePlus 5T
[Xposed Framework Modules] ahb83:
Using the latest iteration of exi and the keyboard size multiplier broke.
[Xposed Framework Modules] Drzhivagolikesandroid:
Keyboard sounds not working in the latest exi for SwiftKey version.

Was working perfectly on the older version.
[Xposed Framework Modules] Roughy:
Those features should all be working.

If you updated to Exi 1.6.0, are you sure you are using a compatible version ( Swiftkey beta / 7.1.2.20+ ), and not the current stable?
[Xposed Framework Modules] rolear8:
Thanks for your work, I sent to your PayPal a little donation keep it up
[Xposed Framework Modules] mankind_18:
Hello. Is there a way for Super Swiftkey to work with this module? Thanks
[Xposed Framework Modules] Drzhivagolikesandroid:
Thanks for the assistance.

But I rolled back to previous version of Exi.

I'm cool with it.
[Xposed Framework Modules] Roughy:
ヾ(❀╹◡╹)ﾉﾞ❀ｷｬﾊ❀ヾ(╹◡╹❀)ﾉﾞ

Super Swiftkey is an apk mod that uses a very, very old version of Swiftkey from back in 2016.

Swiftkey changes all the time, occasionally leading to minor incompatibilities, and sometimes completely breaking everything, such as in the latest update.

The last Super Swiftkey releases uses Swiftkey 6.2.1, which was released a good year before the first version of this module, and is not compatible with any releases of this module.
[Xposed Framework Modules] rehannali:
Hi, I've problem with swipe mode. I select on num bar and it works. Sometimes it stop working and I need to restart my phone to work again. It is a headache to restart phone again and again. Any workaround for this problem?
[Xposed Framework Modules] pratyush28:
Yep same here i've set it to swipe on space bar and it keeps disabling the swipe, even i have to restart to get it to work.
[Xposed Framework Modules] Ibuprophen:
I truly hope you all don't mind if I ask you all a quick "Non-Module" question for you SwiftKey Experts here :)

I'm going to basically get to the point...

I'm currently using the last (of course much older) release of the Super SwiftKey app.

I'm using this one only because it has 2 of my favorite themes that's pretty simple but, isn't available on any of the newer versions of the app.

I would like to know if anyone knows if it's possible to be able to perform any type of export/import function for at least one of them to the newer version of SwiftKey.

Though, I did state 2 themes but, the only one I do primarily use is called "Azat Soro" and the following image is what it looks like.

Thanks a bunch! :)

~~~~~~~~~~~~~~~

UNLESS asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my SM-G900V device.
[Xposed Framework Modules] Roughy:
Aaaaah bollocks.

The mechanism for keeping track of keys for any given layout is one of the things that had to be completely redone from scratch.

Originally I would keep track of the current layout and hook a method that seemed to be called every time it was invalidated, at which point I would clear all the keys expecting Swiftkey to reinstantiate them.

Couldn't do that anymore, so I moved to keeping a buffer of the previous 150 keys around for any given layout, with newer keys bumping out older ones as they are generated. Any given layout has a max of 60 keys or so, so a 150-key buffer should be enough to retain a complete replacement of the layout 3 times over. Assuming I haven't messed up anything else, that probably means something else is generating "temporary" keys that are pushing the real keys out of the buffer. I know this is something some of the whacky Chinese layouts do, but they've kind of been broken for a while and nobody has complained so I've been ignoring it.

I'll see if I can figure out what's causing it or come up with some other workaround. In the meanwhile, anything that causes Swiftkey to re-create the layout should temporarily fix it, such as toggling the number row or arrow keys.

Is there anything special about your configuration? Multiple layouts? Languages with layouts with dynamic content?
[Xposed Framework Modules] rehannali:
I'm just using 2 languages. But keyboard type same for both of it.

There is good if we can delete the selected text from del key i.e. Highlighted text remove automatically.

Thanks
[Xposed Framework Modules] Roughy:
[MENTION=7511257]rehannali[/MENTION] [MENTION=7774486]pratyush28[/MENTION]

I seem to have slightly misjudged just how many dummy keys swiftkey generates.

My initial approach to all of this was to keep track of the key type and content, and just overwriting any existing keys.

This doesn't work because Swiftkey will generate the entire layout multiple times, but for some reason the one generated /last/ isn't always the one being displayed on screen.

I had only observed it repeating the layout process for the same layout twice in succession like this, but it turns out it will sometimes do it 3 times, and perhaps even more, which would result in the real keys getting pushed out of the buffer.

The workaround for this is the increase the size of said buffer to 1000 keys, which should hopefully be enough.

Given the seriousness of the issue I'd prefer to confirm that it actually resolves the issue before pushing a proper update though.

I would appreciate it if you could download Exi 1.6.1 from the link below and report back if it resolves the issue:

https://www.mayulive.com/swiftkeyexi/swiftkeyexi-1.6.1.apk

Thanks
[Xposed Framework Modules] pratyush28:
Sure ill test and report back after using it for a day. Some features stop working randomly like even Modifier keys stop working only the custom key popups work when this bug appears. I didn't understand all that technical buffer stuff xD ill just test this apk for some time and report back. Also thanks for addressing the issue and fixing it so quick!
[Xposed Framework Modules] Roughy:
Swiftkey completely revamped the format of their themes a while back, so any old themes are are unlikely to work anymore.

On the flip side, the new format should be fairly straight forward to modify to your liking, although it will probably take some guesswork.

If you browse to Swiftkey's app data files folder (e.g. /data/data/com.touchtype.swiftkey/files/ ), you will find a couple of folders such as /custom_themes/, /themes/ and /download_themes/.

Inside some of these you will find zip files, each containing a single theme consisting of a single json file describing theme, and a few folders of image assets.

I imagine it should only be a matter of extracting a theme, making your modifications, and putting the file back where you got it.

The json notes the hash of every file it references, so you'd have to calculate that if you replace any of the images.

One of the folders has a theme list you might possibly have to edit too.

Don't quote me on any of that though.
[Xposed Framework Modules] pratyush28:
[MENTION=6797900]Roughy[/MENTION] just installed the v1.6.1 version of exi and it seems to work perfectly. Do you know what triggers that bug? So i can spam those keys/shortcuts to check whether the bug still persists.
[Xposed Framework Modules] Roughy:
I'll try to break it down.

When Swiftkey creates a single key, I figure out what kind of key ( spacebar, letter A, letter B, number etc ) it is and save it to a list.

When the user presses a key, I check the list to figure out what kind of key it is.

Swiftkey will sometimes throw away the keyboard and create it and all its keys again, meaning all the keys I stored are useless, and I save the new ones instead.

I have to delete the old useless ones, otherwise I would eventually eat up more and more memory until the program crashes.

I can't tell when it does this, only when it creates a new key. The initial solution to this was to just keep a track of the 150 last keys that were added, and delete the older ones.

The problem with this, is that Swiftkey creates the same keys multiple times, and only one of them is the real key.

I knew that it was doing this, but thought keeping track of the most recent 150 keys would be enough.

Turns out it creates far more fake keys than I expected, and keeping track of only the 150 most recent was not enough, so I increased that to 1000.

There is still the possibility that something else will keep on creating fake keys (though I have not observed this happening ), so it will take some extended testing to be sure.

Best case scenario: It fixes the problem.

Worst case scenario: It delays the problem.
[Xposed Framework Modules] pratyush28:
Okay now i kinda understand the problem .. so you can increase the number of fake keys stored to a certain extent or the app crashes right? Also does increasing the capacity of keys to be stored increase ram consumption significantly?
[Xposed Framework Modules] Roughy:
The amount of memory required is honestly tiny.

We're looking at something like 16 bytes per key, which would mean it would take something like 60,000 keys to increase memory usage by 1 megabyte.

We could of course just do that, but if it is continuously generating new fake keys we would simply be delaying the inevitable.

1000 should be enough, assuming it only creates 2-3 fake copies of each original key.

If 1000 is not enough, I'd rather look for better solution, rather than just increasing the number of keys we track.
[Xposed Framework Modules] rehannali:
I tried the latest version i.e. 1.6.1. I haven't reproduce this bug. I think it is fixed now and working fine.
[Xposed Framework Modules] pratyush28:
yes i can +1 this tested for 1 day and the bug never appeared! :good:
[Xposed Framework Modules] kalawy:
This may be off topic .. but is it possible to make a similar module for Fleksy ?
[Xposed Framework Modules] Roughy:
Exi for Swiftkey 1.6.2 release

1.6.2 [ 02.09.2018 ] - Bug fixes, translations ( Stable: 7.1.2.21, Beta: 7.1.2.20 )

Changes in 1.6.2 ( Stable: 7.1.2.21, Beta: 7.1.2.20 ):

Fixed

- Swipe, quick-menu, and hotkeys breaking after a while.

Added

- Added missing translations

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

Notes:

Swipe/quick-menu/hotkeys breaking

Read up on the previous 2 pages of this thread if you want the details, but in short we can no longer tell when the keyboard is recreated ( when the keys are replaced with new keys ), meaning we can't remove references to old keys that would eventually eat up all our memory if we kept them around. Solution was to keep the 150 most recently created keys and discarding any older. Turns out I underestimated the number of keys created and 150 was nowhere near enough. [MENTION=7774486]pratyush28[/MENTION] and [MENTION=7511257]rehannali[/MENTION] tested a version with this increased to 1000. A few days have passed without issue, so it looks like we're good. Thanks for testing.

Swipe/quick-menu/hotkeys breaking

I forgot to include the translations with the previous release, despite our wonderful translators ( listed in the about section ) having done their magic.

They have finally been included in this release.
[Xposed Framework Modules] Roughy:
Certainly possible, but a ton of work.

I am probably not going to be working on any similar modules for any other keyboards.

I don't even intend to add any major new features to Exi for Swiftkey, though sometimes I tack on stuff when I have to fix other problems.
[Xposed Framework Modules] oroboros74:
FYI: I'm on stable and got v.7.1.2.21 update a few days ago, making current Exi compatible with current Swiftkey - at least on my device.

Thanks for this as always!
[Xposed Framework Modules] Roughy:
Oooh! I forgot that I had left Swiftkey stable uninstalled while working on the update, and never noticed the update. Thanks!

Should be fairly simple. Add it to the github issues page and I'll maybe remember to tack it on the next time I have to do a compatibility update.
[Xposed Framework Modules] lonicron:
Today I updated Exi for Swiftkey and the swiftkey app itself. Keyboard no longer opens automatically when I open a chat in GBWhatsapp. Could not find related info on google. Any ideas on this?
[Xposed Framework Modules] Roughy:
It's not entirely unthinkable that something I'm doing is having unintended side effects, but somewhat unlikely.

Try with the module disabled and let me know if it is the cause, and not just a change in Swiftkey itself, or perhaps even GBWhatsapp.
[Xposed Framework Modules] oroboros74:
It looks like SwiftKey will soon be able to translate, but will use the Microsoft engine:

https://www.neowin.net/news/swiftkey-for-android-can-now-translate-text-with-microsoft-translator

It seems the best translating engine right now is DeepL, but it's limited to a small number of major languages. Second best, at least for me and the languages I use, is Google's.

I wonder if [MENTION=6797900]Roughy[/MENTION] will consider rerouting the translation engine in the future to a non-MS alternative. Just food for thought!
[Xposed Framework Modules] lonicron:
It seems like GBWhatsapp update caused this as I tried it with Gboard and module disabled etc. Thanks though
[Xposed Framework Modules] Mr6P:
Exi features without Root and Xposed?

Hello, I really love Exi, but I don't want to root my device anymore. That's why I want to know if it's possible to have Exi features without Root and Xposed.

I actually don't need all features, but there are some nice feature like swipe to select and swipe to delete as well as swipe to move cursor.

Is this possible to have them without root? ?

Thank you
[Xposed Framework Modules] oroboros74:
Unfortunately the module requires Xposed, which in turn requires root.
[Xposed Framework Modules] Mr6P:
I know that, I just wanted to know if it would be possible to have some of the features without the Exi xposed module
[Xposed Framework Modules] oroboros74:
This bug was somehow introduced again in one of the last updates, I'm afraid. I have RTL disabled.

Let's wait to see if others report it, and I'll keep an eye out if it happens to me again.
[Xposed Framework Modules] HorstiG:
Great Modul, thank you.