Simple editor on unPhone/

Since I’ve been programming for over half a century, I’m sure I could write this myself, but I’ve also learned that reusing existing code can be a LOT more productive. I’m hoping someone can point me at some existing code that I could grab/edit – I’d prefer Phython, but Arduino (C++) or other code would be acceptable.

What I need:

A very simple text editor and “keyboard” touchscreen display – think a simplified version of what you see for a text message on most (all?) cell phone these days.

It just needs to be able to deal with plain ASCII text, including both lower and upper case, as well as the “special symbols” that are “printing” characters in the 7-bit ASCII definition. I don’t need (or want) any “formatting” beyond dealing with “new line” characters, and the ability to delete the character before the cursor. No search, no “cut and paste”, etc. Just move the cursor around.

It will probably need to be able to deal with a file of 32KB in size. I might try to figure out a way to cram an Adafruit FRAM (PID 1895) into the case to contain the file, or might go to something from DigiKey like a magnetoresistive memory chip. If worst comes to worst, I’ll just put the file onto the microSD card. I have done another Python project where the ESP-32 had to update files on it’s “drive image” without generating auto reboots, so that too is a possibility.

If you’re wondering what this is for, think “update the secrets file” that a lot of Python programs use, but without having to involve any other computer.

Nice idea :slight_smile:

This (LVGL) demo has a keyboard that works well: examples/lvgl-demo · main · Hamish Cunningham / unPhoneLibrary · GitLab

If you want something with a less complex UI toolkit then the “everything” demo has a predictive text input example, though it is very basic and would require some work to make it an editor.