What is stopping you from adapting AOSP to have better keyboard integration? Android has been modified before to adapt to folding screens, tablets and multiple screens.
Locked bootloaders, for one. Even if you can unlock it, there's a disincentive to do so thanks to losing the SafetyNet status - which will brick a whole range of apps that refuse to run if it's not intact.