python Tkinter bind 2.7.9 w-d
Question: Hello I am having problems binding w+d in my code. I see how to do it with
Ctrl+/ and stuff like that but is it different to use two letters? I have
tried to do it a few different way here is the line i use.

    
    
    root.bind('w-d',lambda x: upleftc())
    


Answer: It's a bit unclear what you're trying to accomplish, but if you're trying to
bind to the combination of the letter "w" followed by the letter "d", you
would bind to the two-event sequence `"<w><d>"`, or more simply, `"wd"`.

For the definitive documentation on how to specify events, see the section
["Event Patterns" in the official tcl/tk
documentation](http://tcl.tk/man/tcl8.5/TkCmd/bind.htm#M5).

Here is an example:

    
    
    import Tkinter as tk
    
    class Example(tk.Frame):
        def __init__(self, parent):
            tk.Frame.__init__(self, parent)
    
            self.entry = tk.Entry(self)
            self.entry.pack(fill="x")
    
            self.entry.bind("<w><d>", self.onWD)
            # alternatively: self.entry.bind("wd", self.onWD)
    
        def onWD(self, event):
            print "boom!"
    
    if __name__ == "__main__":
        root = tk.Tk()
        Example(root).pack(fill="both", expand=True)
        root.mainloop()
    

