Is there any way to change the default input language in tkinter?
Here's the code:
from tkinter import *
root = Tk()
text = Text(root , width = 65 , height = 20 , font = "consolas 14")
text.pack()
mainloop()
Here, when I type some text into the text widget, it is being typed in english.
What I want is to type the text in some other language.
Is there any way to achieve this in tkinter?
It would be great if anyone could help me out.
On my MacOS PC, UK Keyboard, I can use various key combinations to get German and French characters. Alt-a: å
Alt e followed by e: é
Alt u followed by o: ö or by u: ü by a: ä by A: Ä
Alt i followed by a: â
Step 1 would be to experiment with that.
2nd Option If only a few characters are required map them to e.g. the F Keys
3rd Option A more thorough approach may be to open a second 'keyboard' window that can send characters to the text box.
With this option the extra window could be permanently open or a further frame in the GUI instead of a separate window.
There may be OS specific ways of doing this more neatly or options in tkinter that I don't know about but this should give some ideas to explore.