Is there a way to detect current keyboard layout in Tkinter?
It is necessary to process keyboard accelerators correctly for such languages as Russian, French, Greek (see my other question for details).
Is there a way to detect current keyboard layout in Tkinter?
It is necessary to process keyboard accelerators correctly for such languages as Russian, French, Greek (see my other question for details).
No, there is no such feature built into Tkinter.
Why not simply have your application ask the user where each special key is, the first time the app starts up? Apple does this with OSX -- it asked me to press a couple of keys the very first time I booted up a fresh install.
You can put the focus into a widget and bind to
<Any-KeyPress>
, and from that grab enough information to bind to whatever key they pressed.