I am having a strange problem with my keyboard and track pad.
Sometimes when I close the led (When I am not using the Mac) for about an hour when I get back I open the led everything is fine but I can't press any key to write my password, but when I press any of the fn keys like the pause and start music or the volume or the brightness it works fine and the light on the caps lock turns on when I press it, but I can't type anything in the password box, or even in the username box.

And sometimes I can't use any multi-touch command like the two finger scroll or the four finger (Show desktop).

And the Macbooks temp. goes really high very fast it goes up to 80C

by the way my macbook got panic 2 times these 2 days, one was yesterday and one was today.

I tried checking the hardware so I booted while pressing the "D" but it said nothing was wrong!!

Please help me!!