Detached Dialogs accept the “rclick” event.
Buttons do not, as far as I know - but you can do this with a ThreeButton - which is a more complex structure. Isn’t this structure somewhat outdated? or at least a somewhat bizarre overhead (especially when you’re creating a series of Dynamic Buttons) just to obtain the possibility for capturing a right-click?
There is a button modifier @ keydown which can capture ctrl, shift… Isn’t it about time to have a modifier, say, @ mousekey, which accepts lclick, rclick, and perhaps mclick for the scrollwheel button? That makes it much more straightforward if all we need is capturing something else than the left mouse click.
Or maybe the possibility already exists but I missed it in the list of modifiers?
UPDATE: I extended this request with a related question, whether it would be possible to detect the coordinates of buttons, so we can compare it with mouse cursor coordinates and make a button click react differently when you click, for instance, on the right or on the left half of the button.