For a portable device I'd love to see a layout/controller like this [0]. I owned one for a while over 10 years ago, and while it took a while to get used to it, it was great for typing text. I gave up on it because I rely a lot on hjkl for movement everywhere and symbols for programming weren't super accessible, so it wasn't really all that convenient for my main use case, but I'd use it over any 7-inch physical keyboard (or virtual keyboard, of course).
Personally I don't think there's a good traditional (as in, flat and square mesh of keys) keyboard in those size ranges. For me it's regular keyboard if there's space, gamepad-like at around the 7 inch size, then BlackBerry style if any smaller.