title: Tkinter - Can't bind arrow key events
body: <p>I am trying to bind the left and right arrow keys to an event in Tkinter, but when I run the program it appears the events are not triggering. Here is the code:</p>
  
  <pre><code>from Tkinter import *
  
  main = Tk()
  
  def leftKey(event):
      print "Left key pressed"
  
  def rightKey(event):
      print "Right key pressed"
  
  frame = Frame(main, width=100, height=100)
  frame.bind('&lt;Left&gt;', leftKey)
  frame.bind('&lt;Right&gt;', rightKey)
  frame.pack()
  frame.mainloop()
  </code></pre>
  
  <p>Why is this not working?</p>