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.