Hello, first time poster,
I’ve made a patch to add a keyboard shortcut to close plot windows with the ‘q’ key (patchfile attached, in case it is of interest to the matplotlib team). But as I was finishing it up, I noticed that there was already something similar in the code, commented out (even using the same key!):
#if event.key == ‘q’:
self.destroy() # how cruel to have to destroy oneself!
I didn’t implement it this way (I used self.close() and tried to emulate the other key commands), but I wondered if this was an indication that adding a keyboard shortcut for close() was a bad idea for any reason.
Also, is it possible to a custom keyboard shortcut for particular backends? For example, I’d like for “command-w” to close plotting windows for the mac os x backend. Would this be added to backend_macosx.py?
Finally, I noticed that on OS X, the plots used to be the active window once they were created (1.0.0, possibly earlier), but now they appear behind my terminal window when created (1.0.1). Is this a setting in backend_macosx.py, or somewhere else?
Thanks for your time, and the wonderful plotting library,
mlw.patch (1.5 KB)