Tkinter bind single key

John Hunter jdhunter at
Tue Nov 6 00:13:44 CET 2001

I am reading 'An Introduction to Tkinter' by Fredrik Lundh and my read
of Chapter 7 'Events and Bindings' is that this syntax

        self.__canvas.bind('+', self.zoomin)

should bind the '+' key to the member function zoomin (but it doesn't
work).  I know the function and everything else is ok, because when I

        self.__canvas.bind('<Button-1>', self.zoomin)

Everything works as expected (mouse-1 causes a zoom event).

Is there something I am missing about binding regular keys?

John Hunter 

More information about the Python-list mailing list