Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.24k stars 84 forks source link

Remember input language by app #596

Open markokocic opened 5 months ago

markokocic commented 5 months ago

It would be nice if HeliBoard would remember last used input language not globally, but based on an app.

Use case: I have 5-6 different languages installed. I use browser and terminal almost exclusively in English, messengers in my native language, bank apps in German and language learning apps in the language I learn.

It would be very nice, if possible, if HeliBoard would remember last used language for every app when started, so I wouldn't need to switch keyboard every time when switching app.

Helium314 commented 5 months ago

This should be relatively simple to do.

Setting the keyboard should happen in onStartInputInternal. EditorInfo.packageName is the app name. Not sure when to best store the selected keyboard. Either when switching language, or when leaving the input field.

markokocic commented 5 months ago

When selecting the language may be the obvious choice.

Not sure if leaving the input field event get triggered in all cases, for example when switching or killing apps.

tenextractor commented 5 months ago

Please make this an option and not the only possible behavior, if it gets implemented.