New Shortcut - Key/Key Combinations for Tools

Well it’s more an issue of how the toolbutton (action) and the keypress_event would handle pressing the spacebar. If they’re both active, the action shortcut will get the event first and toggle the state of the pan tool button. The event is then passed on where the keypress_event handler then toggles it again… and since the space is still pressed I believe it keeps sending an event that the spacebar was pressed, causing the toolbutton to constantly toggle on and off until the space is released… leaving it in an undetermined state.

It’s possible I can eat up or not pass the event on in my keypress_event handler, in which case the action shortcut would not recieve the event, BUT if the action get’s the event first, there’s not much I could do, as the toolbutton will at least toggle twice.

In any case the spacebar shortcut does work. I’ll play some more tonight. :slight_smile:

2 Likes

I got both options working, albeit with a pref for one or the other. Which is no big deal as a user would work one way or the other. It’s a real subtle difference between the two.

3 Likes

That’s great, thank you :slight_smile: And I totally agree that one would only use it in one way anyways.

2 Likes

I updated the Help->Shortcuts dialog to add “Space” as another shortcut for pan. I also noticed that a couple of the Zoom toolbar items had the wrong (short cut) tooltip, and the order of the items didn’t match the order of the items in the View menu - so I fixed those too.

3 Likes

Made a PR ( #665) for this issue - Feature: Improve pan behavior by using spacebar key (#664).

2 Likes