Hi, glad to see some people experience the same problem. Its pretty frustrating and solving it (using repair permissions) costs 20 minutes.
i posted yesterday my problem to stackexchange: http://apple.stackexchange.com/questions/169740/mouse-and-keyboard-on-macbook-ai r-mid-2009-dont-work-partially/169871#169871
also uploaded the error log from the time when it happened (during copying from a usb stick) OSX ejected all USB devices and stopped to read input from my internal keyboard and mouse. (Not during sleep!)
error log: http://pastebin.com/b0zDwzL4
After the first shutdown, i tried to boot the mac, but got a black screen. Nothing happened. The second time i was able to enter recovery menu via cmd+r
then solved the permissions:
User differs on "private/var/db/displaypolicyd"; should be 0; user is 244.
Group differs on "private/var/db/displaypolicyd"; should be 0; user is 244.
then rebooted, stuck in black screen (altough fan went crazy). Had to hard shutdown. Then booted into OSX, and mouse and keyboard are working again.
Got a mid 2009 Macbook Air with Yosemite 10.10.2 and the latest updates. Of course it expired service help from Apple, so maybe someone with active support license could ask for help, it would be helpfully for most of us (i think).
I tried your solution and will hopefully not encounter anymore problems. Thats pretty frustrating, but as an Windows user frustration is my motivation.