It would be rather non-standard for a menu to handle left and right clicks differently. Also, I bet if Don thought it was a good idea to do this he'd have already done so for the toolbar's overflow menu.klownboy wrote:@highend and Sammay, by the way do think it's within Don's power or should I say even possible to have XYplorer recognize whether someone has made a right click versus a left click on a menu item as he was able to do on CTBs. I can see much potential use for that well beyond this script. It would certainly make this script much more powerful. I may make wish at some point after he's recovered and got the next big thing behind him.
What you truly want is an entirely new function which generates a floating toolbar having either a horizontal or vertical orientation, but this brings with it a whole bunch of other problems.
Frankly, I believe a better solution is for your menu showing the buttons to include one item 'Trigger Right-Click Action' which is a script that toggles a variable between having a value of 1 and a value of 2 and then shows the menu again. (Ideally it should also be checked when value is 2.) This variable is then what you pass to the button or userbutton SC to emulate a right-click instead of a left-click.
Yes, this makes right-clicking slightly more difficult as it requires an additional click (though when running your script from a CTB you could pre-click it). However, it retains keyboard navigation, doesn't require any work from Don, and keeps things rather simple without breaking standard menu behavior.