matplotlib/matplotlib — pull request #717 by jdh2358 (2012-02-26 15:11:15+00:00)
Title: expose key press handler

The mpl key press handler is tied into the implementation of FigureManagerBase, and so is not accessible to most GUI implementations which decouple the FigureCanvas and toolbar from the manager. In this patch, I factored out the key press handling code into backend_bases.key_press_handler and update the tk, qt and gtk examples to show how to use it