My laptop does not turn input devices off/on very well depending on whether the laptop is open or closed. When closed, the mouse pad often registers mouse movements and clicks. To fix, added a simple script to my bin.
References http://askubuntu.com/questions/65951/how-to-disable-the-touchpad