[Tkinter-discuss] Tkinter and Alt bindings

Michael Lange klappnase at web.de
Fri Feb 10 16:45:20 CET 2012


Hi,

Thus spoketh Russell Adams <RLAdams at AdamsInfoServ.Com> 
unto us on Thu, 9 Feb 2012 14:51:49 -0600:
(...)
> 
> I see these comments, however they don't exclude Mod1, just alt and
> other modifiers.

Here ALt and Mod1 behave exactly the same, so
when I change the line in entry.tcl from <Alt-KeyPress> to
<Mod1-KeyPress> the binding to <Alt-s> in the script still works as
expected. Probably this corresponds with the line
    mod1        Alt_L (0x40),  Meta_L (0xcd)
from xmodmap?

(...)
> Getting closer to an answer, but still trying to explain the
> behavior.
> 
> Does this mean that when Alt_R is bound to anything, the Alt_L
> behavior changes? Any why only for Tk?

That's it! I just created a ~/.Xmodmap just like yours and after logging
in again the odd Tk entry behavior is just the same here.
About the reason I can only guess; since Tk apparently only knows about
Alt, but does not differ Alt_L from Alt_R it maybe just takes whichever it
gets and internally treats them both as "Alt".

So if you remove your ~/.Xmodmap, is the issue then fixed?

I am not sure what exactly you want to achieve with your ~/.Xmodmap
entries, probably something like to changing your Alt_R key into something
like the AltGr key which I have here on my german keyboard instead?
Anyway, maybe there is another solution possible which does not interfere
with Tk. Here I found something which seems related, don't know if it
helps you any though : https://bbs.archlinux.org/viewtopic.php?id=58145

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

There comes to all races an ultimate crisis which you have yet to face
.... One day our minds became so powerful we dared think of ourselves as
gods.
		-- Sargon, "Return to Tomorrow", stardate 4768.3


More information about the Tkinter-discuss mailing list