[Tkinter-discuss] Focus for first key press

Michael Lange klappnase at web.de
Thu Jun 21 10:52:30 CEST 2012

Hi Mark,

Thus spoketh Mark Summerfield <list at qtrac.plus.com> 
unto us on Thu, 21 Jun 2012 08:03:55 +0100:

> Below is an example. If I do
> $ python3 hello.pyw
> and then type Alt+F, the File menu does _not_ pop up. If I then type
> Alt+F a second (or subsequent) time it does.
> It seems that Tkinter is ignoring the *very first keypress*. If I press
> any key (e.g., Space, or x) and _then_ Alt+F, the File menu pops up as
> it should.

I cannot reproduce this behavior, here (debian squeeze) the example works
as expected, so the problem appears to be platform specific.
Does this happen with "normal" bindings created through bind(), too
(which might point to some window manager issue) or with menu shortcuts
only (which might point to the tk magic that handles these behind the
scenes), and what is the exact platform ?



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

Not one hundred percent efficient, of course ... but nothing ever is.
		-- Kirk, "Metamorphosis", stardate 3219.8

More information about the Tkinter-discuss mailing list