How do I disable default Tkinter key commands?
I'd like to implement my own key command. However when I do, it does both what I tell it and the default command. How do I disable the default command, so that my command is the only one that runs?
开发者_如何学GoThis is on Windows 7, BTW.
Put return 'break'
at the end of your event handling function. This tells Tkinter not to propagate the event to default handlers.
精彩评论