New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Down arrow on GTK3 backends selects toolbar, which eats furthur keypress events #6349
Comments
Did this used to work? My naive guess is that this is a 'feature' of the underlying GTK toolkit which is intercepting the arrow-down and moving the focus to the toolbar. Once this is done then (correctly) the keys are going to that gtk widget instead of the canvas and the mpl python layer no longer sees the events. attn @fariza |
In Gtk3 and Gtk2 for all event handlers we are using the same technique
In Gtk http://www.pygtk.org/docs/pygtk/class-gtkwidget.html#signal-gtkwidget--key-press-event So by returning False we keep the event propagation. Before going with a PR, is there any case that you can think of that we want the event to keep propagating? How do we handle that with other backends? @OceanWolf any thoughts on this? |
@tacaswell I'm sorry, I don't know if it used to work or not, just that it's different between backends in the current release. |
Git blame shows that |
Well, unless someone can get a seance protocol working for github, I doubt we will ever get an answer to that question, then. The good news is that since it was like that so long ago, it was well before there was any serious attempt at normalizing behaviors between backends. Heck, it was only about 4 years ago when we finally managed to iron out most of the differences in backends with respect to whether or not Unless someone else from back then can remember a good reason why this was set that way, I vote to change it. |
👍 to changing it as well On Mon, May 2, 2016 at 11:55 AM Benjamin Root notifications@github.com
|
Heya, I only know of this by the As I understand it you propose changing it so that one cannot shift focus to the toolbar. While this would make MEP27 a bit easier to implement, alarm bells ring for me from an accessibility pov, AFAIK from UI Design, the ability to use the keyboard instead of the mouse for navigating the UI. However as I have very little knowledge of accessible design, I would like to get some feedback from people who know more about this. Anyone know who we could ask? |
attn @doraf I am inclined to say that we should pull this off now and then put the accessible features back in in a systematic way later. |
Oh and another place where one might need this, embedded applications. Technically one can work around that with MEP22, creating a Tool that takes the Tab press and routes it to the next item in the tab order, but that feels a little like overkill... |
One could return |
Closed by #6397 |
If you use the gtk3-based backends (I had gtk3agg and gtk3cairo installed), and capture keypress events, it works, until you hit the down arrow. The down arrow cause the buttons on the toolbar to be "selected" with a little marquee box, which you can move left/right with the arrow keys. But keys no longer go to the
key_press_event
handler. Other backends work as expected, all arrow keys are always captured.The text was updated successfully, but these errors were encountered: