Answer to: Pinion drive gear in the gearboxYes you are right. The cog should be fixed to the shaft and turn with it; that's went wrong with mine. You can find replacements online.
Answer to: How do I replace the keyboard?It's held in by about 30 TINY TINY screws, and you have to remove the logic board to get to it. I've done this on a 2009 model and it's not a very fun job!