rkkr / simple-keyboard

Apache License 2.0
1.13k stars 225 forks source link

Generate KeyboardTextsTable from templates #436

Open soshial opened 10 months ago

soshial commented 10 months ago

The LatinIME keyboard's KeyboardTextsTable can still be generated by templates (see template example here). Here's the generation code for that. Maybe Simple Keyboard should also employ the generation instead of just editing KeyboardTextsTable.java output file which was not recommended?

rkkr commented 10 months ago

The story is that I threw it out of LatinIME along with lots of other stuff when I started the project as I didn't intend to make changes to it. I also never expected to receive a PR into this project.

I don't really have an opinion if it's worth to bring it back. Java file is mostly well commented so if you only need to edit a single KeyHint it's usually easy to find it. If nulls weren't put into long sequences without comments I'd say it's as easy to edit. Adding a new KeyHint isn't easy.

The complication with generation code is that now there's a new project that you need to figure out how to run.