anssih / finqwerty

Keyboard layouts for Android phones with physical keyboards
Apache License 2.0
19 stars 11 forks source link

Feature request: allow loading custom .kcm files #10

Open imax9000 opened 4 years ago

imax9000 commented 4 years ago

I want to create a custom layout for my Fxtec Pro1, but there seems to be no straightforward way for doing so without rooting the phone. It would be awesome if I could use FinQwerty to load character map from a file. Then I'd be able to iterate quickly to fine-tune the layout.

anssih commented 4 years ago

Unfortunately, as far as I know, that is not possible to implement in-app, as the keyboard layouts xml and the layouts themselves have to be in app resources files, so read-only (or "hardcoded" at build time).

A similar thing that should be possible is to implement a script/webpage that could autogenerate an APK that contains the .kcm file given by the user. I'll keep this feature request open for that, but I will likely not have the time for that in the immediate future.

imax9000 commented 4 years ago

Aha, I see. I've found another app that kind of allows run time overrides, albeit in a pretty awkward way. If .kcm files indeed must be read-only resources, then doing what that app does, but using .kcm file as input, would require in-app re-implementation of parsing and processing logic, which is... not exactly best idea ever.

APK generator you describe is very likely to be the closest thing we can get. And given that rooting won't be required - that's already a lot :)

pvx- commented 4 years ago

+1 for this request :), replacing kcm (and maybe kl, if possible) is the only reason I would root my phone.

All that would be needed is one (kcm) or two (kcm+kl) files, that would show with a fixed name in keyboard layout setup.

I know next to nothing about Android development, but from what I read APK is just a ZIP with a signature, which can be created with any key (you probably need to allow install from any source then). In that case, please just create the application ZIP (or APK) with demo kcm & kl files and I can make .sh and .bat files to modify it with user files. I have found only a Java-based way to sign (signapk.jar), if there is one using standard tools (like openssl), I can even create a PHP file that could be hosted anywhere and return APK for uploaded keyboard files :).

FinQWERTY already makes the phone much more usable (thank you for that :) and having a way to use custom layout would be great :).

Edit: you probably don't need that :), but here is something like this done: https://forum.xda-developers.com/droid-4/themes-apps/keylayout-ported-extended-keylayouts-t3647481 (I planed to experiment with that, but having it done by someone who knows what he is doing would be much better ;).