I am using the wxAgg backend with the NavigationToolbar2WxAgg toolbar. I would like to hook up a keyboard shortcut that will call the ‘home’ button on the toolbar. The only way I know to do this is the call the wx event with the ID of the home button. The problem is that this ID is not a member variable in the NavigationToolbar2Wx class. And I don’t know of any wx method to get a toolbar button ID based on position.
This is what line 1643 of backend_wx.py looks like:
_NTB2_SAVE = wx.NewId()
It would be great if _NTB2_HOME, _NTB2_SAVE, and _NTB2_SUBPLOT were also made to be member variables. Or if someone knows a better way, please let me know.