One of the more common causes of simultaneous failure of both trackpad and keyboard is "wear and tear" on the exposed portion of the upper case cable located within the battery bay. (This was the case on my Macbook Pro).
To diagnose whether or not this is the issue, I recommend the following tweak. I'll describe it in brief below, but you'll find it better detailed at the following URL: http://lbarclay.wordpress.com/2009/01/29...
If you take out the battery, you will be able to see an orange cable extending from the case and plugging into a board protected by a transparent plastic barrier. (This cable is the upper case cable). Simply placing constant pressure on this portion of cable appears to restore function to the keyboard and trackpad. To apply this pressure, some have used cellophane tape or simply sandwiched a few business cards in between the battery and cable. This is simply a stop-gap measure, but if it works on your machine, it will be diagnostic of the problem and will allow you to continue working with your machine normally until a replacement upper case cable can be installed.
The replacement cable is sold on ifixit for about 30 bucks... just do a search for "upper case cable" on ifixit to find the one appropriate for your machine.