I was having the same issues with my MacBook Pro for the past few weeks. I took it in 3 times - the first time they moved me back to 10.5.1 - that didn't work. The second time they took out my memory and put it back in thinking it could be bad. That seemed to work for a few hours, but the keyboard and trackpad started freezing again a few hours later. Finally the 3rd time they checked it in and ended up replacing a bad cable. They said they noticed the LED light at the front of the MBP was not lighting up, so they checked it out and decided that the cable was bad. So if you are having this issue, check to see if your LED light is working. The part they replaced is part #922-8045 (Flex Assy HDD/IR/SIL). My MBP was not under warranty, but they still covered the part and labor. Since the replacement, the LED is working again and no more keyboard/trackpad freezes!