Something that I'm missing from both the article and the comments - I would remap the sleep button to F4 at OS level. Repeat analogous steps for other keys.
Granted, you'll lose these functions, and likely switching to another keyboard will drive you mad, but I guess this is a good stopgap software based solution.
Another option (he's using Windows) is "change what the power buttons do" in Control Panel to make the sleep button into a no-op.