Shortcut to disable keyboard/mouse in OSX
This is a common problem for mac users, press the option key 5 times, and it will be fixed. 

Source:
     http://www.mackungfu.org/cat-proofing-a-macbook-keyboard