I had the same problem and did not find an appropriate solution other than creating (or at least heavily improving) one myself. I used
petemojeiko's virtual keyboard on GitHub
as a starting point for creating my own solution. It needed to be usable in typing a complex password, so it sports keys for lower- and uppercase letters, numerals and (most) symbols a regular keyboard supports.
However, due to the need to fit it on a small screen, I put the numerals and symbols on a third layer (like a symbol-shift). This presented me with basically the same proble you had in the second part of your question (switching between layers).
I solved it by implementing three keyboards (one for each layer) and destroying one specific keyboard as well as the frame containing it and creating a new one each time I wanted to change between those layers (or switch to a different entry widget):
self.frame1.destroy()
self.frame2.destroy()
self.kb.destroy()
self.frame1 = ttk.Frame(self, width=480, height=280)
self.frame1.pack(side="top", pady=30)
self.kb = vKeyboard(attach=self.entry1,
x=self.entry1.winfo_rootx(),
y=self.entry1.winfo_rooty() + self.entry1.winfo_reqheight(),
keysize=self.keysize,
parent=self.frame1,
controller=self.controller,
enterAction=self.enterAction)
I'm still new to Python/Tkinter, so someone else might be able to do it without destroying the parent frames, but this worked for me (and even on the limited ressources of a Raspberry Pi, it didn't cause any problems).