When I switch the keyboard to Russian layout, my widget gets key events with some diacritics in keysym instead of Russian letters.
Here's a demonstration (using the dump module):
import Tkinter as tkinter
from dump import dump
def show_event(e):
dump(e)
root=tkinter.Tk()
lb = tkinter.Listbox(root)
lb.grid()
root.bind_class('Listbox','<Control-Key>', show_event)
root.mainloop()
Now, when I focus the listbox and press Ctrl with letters фыва (that correspond to asdf), the keysyms in the printed events are: ocircumflex,ucircumflex,acircumflex,agrave.
While I, naturally, expected to get Cyrillic_ef, Cyrillic_yeru etc.
At the same time, if I type text into an Entry, Russian letters are inserted correctly.
Any ideas of what is going on & how to fix? That said, maybe it doesn't even need fixing (it may allow one to use the same binding for any non-English keyboard layout) but I'd still like to know the reason for this highly counterintuitive effect incl. if it's by design.