I'm with Gryd3. The simplest way is to turn off the screen save or sleep settings. Sometimes these settings are hidden under advanced settings.
If that is not an option, You can salvage a mouse or keyboard controller and tap into it with a timer circuit.
Thanks Tha Fios... (I still can't get used to that name)
That would certainly be an easy alternative... but the op had requested it only happens when there is no activity...
To add on to your suggestion though, perhaps the op can use the 'Ctrl' button instead of right-click... it probably has the least amount of impact to randomly press while someone is working on their computer.
every 5 minutes when there is no activity detected from the mouse and or keyboard?
If you want to make hardware to do this... the hardest part will be determining if there is no activity on the keyboard or mouse.
If you want software to do this, simply change a setting, or make a small script or program that does anything from a right-click to a simple (Move mouse 1 pixel in any direction)
If you are using windows, it will be hidden in the advanced section of 'Power Options' ... you need to 'Edit Plan Settings' of the active plan you are using, then you need to change advanced power settings, This will let you control the time it takes to turn off HDDs, the screen, and finally putting the computer to sleep.
If you don't have administrator access to do this with the machines, then I can't help you any further. Many companies place voery short times on the 'sleep' or 'screen off' times to force the machine to prompt for a password. This could circumvent the policies in place as your work place.
If you have administrator access... then surely, you would want to just change the timeout values here instead of building custom hardware which may or may not require additional custom made drivers, or run the risk of interfering with normal keyboard / mouse behaviour if the device taps into them.