Page MenuHome

Action With Second Press of Pie Shortcut Key, or with 5 key.
Needs ReviewPublic

Authored by Justin Jones (jjones780) on Jan 17 2019, 9:52 AM.

Details

Summary

If the user taps the shortcut key to stick a pie menu this patch will allow them to activate the menu with a second tap of the same key. In most cases the user will have not moved the mouse and it will result in a dismissal of the pie menu. If the user has moved the mouse over an item this action will cause that selection to be made.

For consistency, in the rare occasion where there is a conflict between the pie keymapping and one of the pie menu's shortcuts the pie keymapping will take priority.

In the process of adding the number 5 functionality the code to process the other numeric keys was re-positioned and simplified.

Diff Detail

Event Timeline

Seems nice to me. The users hand is already likely to be over the key that was used to activate the pie menu, so this serves as a quick way to dismiss the pie menu again, or to activate the pie item.

Justin Jones (jjones780) updated this revision to Diff 13384.EditedJan 28 2019, 11:55 AM

Added a preferences item to turn on or off this action (defaults to on ). This should help avoid any unforseen issues.

Works with complex pies: "3D Viewport Menus" addon etc. Tested successfully on submenus.

Also:
Removed changes that had nothing to do with this feature ( had changed elegant macro for numpad keys to simple code during other experiments ).

Please note that this small diff has been cleaned up from its originally intention (testing) to something I hope is more efficiently reviewable.

I considered adding logic to work around in-pie shortcut overlap with pie-callup shortcut but this would be rare ( very few pie shortcuts use a non-modified alpha key) and the user would still be able to use numeric shortcuts. If it is an issue this behavior can now be turned off in prefs. In addition I plan to look into automatically removing underlines from pie items to avoid any possibility of confusion.

ALSO:

I was hoping to experiment with the following pie behavior (but I've run short of time lately... hopefully soon).
Has anyone tried multiple pie taps to select items from the pie. i.e. three taps to open then choose second item ( could try ignoring mouse movement at successive taps)? This would be handy for newcomers and wouldn't get in the way of power users.