I am trying to program specific behaviour when the user (clicks and) releases the left and right mouse at the same time. Is there a known way to trap such an event / gesture. I am aware of how to trap leftButtonUp and rightButtonUp but not sure how I can trap this event.
If the left button is pressed and then the right button is pressed with a delta delay, that is OK. When the user releases the right button / left button and if this is followed up by release of other button within a defined epsilon time then such an event should be raised.
There is no such event in WinAPI, but you may track it yourself. wParam of all button down/up messages contains information of the state of all buttons at the time of event:
Thus, you need to keep the track of changes and define a threshold that will filter out all events that you like to consider as a “simultaneous click/release”