There is a special function that matches event objects. If the actions of two event objects are not identical, the events do not match. If they are identical, then the events match if the modifiers are identical, or if one of the modifiers is Any. See Event Modifiers.
t if events ev1 and ev2 match,