The simplest would be to make a 555 Timer circuit that triggers every 20 seconds. Use the output to drive a small relay wich is in parallel with the right mouse button...
Problem is you don't know what gets switched inside the mouse by the button, you would need to figure the circuit out to know how to place your transistor. A relay is completely system independent.