Layout is one of the hardest problems in UI toolkit design because there are so many different ways to design a layout.
Creating a system that supports them all is practically impossible. Even creating a system that merely makes them
all possible to implement (even if difficult) is a challenge. And making the layout fast is even harder. However,
given that we are targeting embedded systems, rather than general purpose interfaces (ex: no resizable windows), we
should be able to narrow down the scope to something usable. Let’s dig in.
As part of my ongoing research with embedded Rust on ESP32 devices, (starting with the T-Deck but eventually branching out to other devices), I started creating a simple reusable UI toolkit to automate the boring code that I end up writing over and over for every example. The code is on github but I haven't made a crate for it yet.
I’m really enjoying using no_std Rust for embedded programming on
the Lilygo T-deck and
I want to share what I’ve learned so far. There are many excellent tutorials and docs on Embedded Rust in general and the ESP32 in particular, so I’m going to cover things that are specific to the T-deck or that I’ve found to be under documented. Today let’s start by looking at the T-deck’s signature feature, the keyboard.
I've been having a lot of fun with this little device called a LilyGo T-Deck. It's built on an ESP32-S3, has a 320x240 touch screen, a funky little track ball, built in wi-fi, and a seriously nostalgia-inducing physical keyboard. I bought the T-Deck about a year ago but because I was sick (with undiagnosed Type 1 Diabetes) and haven't done much with it until the past few weeks.