Context-dependent layouts
Talking to PanLex recently, I've learned of layouts where the next set of characters depends on what has been typed before, for example the Balinese script.
I'm not sure how to implement it, but it's worth remembering.
Perhaps it could be emulated in a limited way by allowing some buttons to both emit text and switch layouts on one click.