I have had the same problem and I have find the solution... I was ready to restaure an old back up from time machin. To do so, I have before '''clean the desktop'''. I classified and '''removed all the desktop documents and restart the computer'''. Miracle, my macbook worked fine again. I think a document on the desktop was the cause of an interference with the keyborad and trackpad.