[Tutor] Windows 98 Tkinter binding event <Return> fails

Georg Simon georg.simon@bnmsp.de
Sun, 26 Nov 2000 13:57:10 +0100


I took bind1.py from Fredrik Lundhs Introduction to Tkinter and
altered it slightly to wait for the Enter key instead of a mouse button
:
---------------------------------------------
from Tkinter import *

root = Tk ()

def callback ( event ) :
    print 'called the callback!'

frame = Frame ( root, width=100, height=100 )
frame.bind ( '<Return>', callback )
frame.pack ()

root.mainloop ()
---------------------------------------------
It does not work. Does that mean that it is impossible to use unbuffered
keyboard input with Tkinter under Windows ?

Georg Simon