[Tkinter-discuss] Combining events?
Bob Greschke
bob at passcal.nmt.edu
Sat Jul 19 00:54:34 CEST 2014
I have a huge program...several huge programs...and I keep writing duplicate sets of calls for <Return> and <KP_enter>. I'm tired of it, even though they are already all written. Is there any way to combine those (those two, specifically) into one bind like
x.bind(("<Return>", "<KP_Enter"), command = .....?
I know you can't do that, but something like that on a global scale (both figuratively, and programmatically). Some little line of code at the beginning of the program that redirects the <KP_Enter> to the <Return> event when some field or whatever is specifically looking for either return key to be pressed?.
Thanks!
More information about the Tkinter-discuss
mailing list