title: Keyboard binding events tkinter not working
body: <p>I've been trying to add a keyboard shortcut in <strong>Python 3</strong> that activates a function. </p>
  
  <pre><code>from tkinter import *
  from tkinter import messagebox
  root = Tk()
  def myThing():
      messagebox.showinfo("Hi", "Hello")
  root.bind_all("&lt;control-m&gt;", myThing)
  root.mainloop()
  </code></pre>
  
  <p>But when I press control m, this comes:</p>
  
  <p><a href="https://i.stack.imgur.com/g84o3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g84o3.jpg" alt="Error"></a></p>
  
  <p>sorry, the copy-paste doesn't work for the command prompt</p>
  
  <p>But, when I do this:</p>
  
  <pre><code>from tkinter import *
  from tkinter import messagebox
  root = Tk()
  def myThing(k):
      print(k)
  root.bind_all("&lt;Control-m&gt;", myThing)
  root.mainloop()
  </code></pre>
  
  <p>It does this:</p>
  
  <p><a href="https://i.stack.imgur.com/VZWSO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VZWSO.jpg" alt="enter image description here"></a></p>
  
  <p>what am I doing wrong?</p>
  
  <p>I know that there are questions like this online, but I tried all of them, and got that error. I asked this question because the answers weren't clear enough for me.</p>
  
  <p>PS: This is python 3.5.2</p>