You could work around this for the Entry widget by binding a subroutine of your own to the "KeyRelease" event: each time a key is released, bind will call your sub and provide the keycode; now, all you need to do in that subroutine is to remap the ASCII codes to their Cyrillic equivalents (in whatever character encoding you happen to use for Russian).
I'm assuming that you have been able to use other Tk widgets (labels, listboxes, etc) with a suitable Cyrllic font in order to display strings in Russian. I'm also assuming that you are familiar with an appropriate keyboard mapping for Cyrillic input (e.g. the key that would be "S" on an English keyboard maps to "C" on a Russian keyboard, or whatever).
If these assumptions are correct, then it should be the case that when your KeyRelease-bound subroutine replaces ASCII keycodes with the proper Russian character codes, the Entry widget will display the Cyrillic characters that you want to see.
The subroutine probably won't be as simple as I've made it sound... First, the KeyRelease event will occur when you release any key -- and you only want to remap the ones that represent Cyrillic letters, so if the key just released is not a letter with a Cyrillic counter part, you should just leave it alone. Second, as the user types a string into the Entry, your subroutine may need to extract the widget's current string value, edit it, and insert it back into the widget, in order to make the Cyrillic characters show up as intended. This is not really a difficult issue -- just a tedious detail that you'll need to work out. (I'm sorry that I'm not in a position right now to try something out by way of example.)
In reply to Re: Russian input with Tk
by graff
in thread Russian input with Tk
by mamont
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |