Picked up a "badUSB" USB dongle thing that has an AVR microcontroller in it.
Pulled it apart and inspected it, reflashed the bootloader with a known good one from the Arduino distribution over the ISP so it has trusted code on it, then wrote a new bit of application software that pretends it is a mouse (USB HID device) and moves 1 pixel up and down at a random interval between 10 and 20 seconds.
The movement is not noticeable, except to the OS. However, it stops the OS from dimming or locking the screen, and/or going to sleep. Really useful for when taking part in a web conference where you aren't touching your computer, or a demo where you are showing something from your machine - no need to keep moving the mouse or pressing a key to stop the machine locking.
You could do the same thing going in to settings, but then you've got to remember to switch it back. This way you just plug in a device to stop it locking and unplug when you are happy for auto locking to start again. And it works on all my machines, regardless of OS installed.