title: Working with matplotlib key events and modifiers
body: <pre><code>import matplotlib
  import matplotlib.pyplot as plt
  print matplotlib.__version__
  print plt.get_backend()
  
  def key_event(e):
    print e.key
  
  fig = plt.figure()
  fig.canvas.mpl_connect('key_press_event', key_event)
  plt.show()
  </code></pre>
  
  <p>I'm interested in key press event handlers with modifiers (e.g. Ctrl, Alt, Shift) in matplotlib/pyplot.  <a href="http://matplotlib.org/api/backend_bases_api.html?highlight=key%20event%20modifiers#matplotlib.backend_bases.KeyEvent" rel="nofollow">This</a> part of the docs mentions some support for modifiers.  But when I use the code above I don't see that behaviour.  </p>
  
  <p>I would prefer to avoid having to handle the modifiers manually with maintaining state about those key press / release events; for example, I want to be able to easily distinguish between <kbd>a</kbd> and <kbd>ctrl</kbd>+<kbd>a</kbd> without having to maintain a state about control up/down.</p>
  
  <p>-Am I missing some higher level interface somewhere, where modifiers just work?<br>
  -Or perhaps that part of the docs only applies to GTKAgg backend, when I generally use TkAgg?<br>
  -Maybe the support for modifiers perhaps something which was added recently, and isn't in my matplotlib version 1.1.1rc?</p>