the texteditor triggers opening the keyboard by calling the Open slot inside ExtendedVirtualKeyboard::KeyboardAnimated. You could in this slot check if the 'sender' is of class ExtendedVirtualKeyboard::TextEditor by casting it to this class. If thats the case you could check at this texteditor instance some properties that you have defined to describes the layout which should get opened on opening the keyboard. Dependent of this the keyboard layout can be set.
Hope this gives you a rough overview how this could be solved.