This is beyond App Inventor's basic capabilities. You might be able to use App Inventor for the User to define a keyboard, using a dynamic components extension, but then you would need another extension that could convert that layout into a stand-alone keyboard that the phone could use. Currently such an extension does not exist.
So really, it is very difficult to achieve your goal. You could probably do it with Android Studio using Java or Kotlin.