The space bar on the keyboard that came with my iMac is working about every 3rd time I hit it. I got the iMac in April so it's still under warranty and I have Apple Care on it. Will Apple repair or replace my keyboard under either policy?
AppleCare and warranty are the same thing. And yes, you're covered. Apple even replaced my iPod's earphones under warranty when the rubber bits started coming off.
Yep - your keyboard is covered under your AppleCare warranty.
Also - worth a note, if you ever need to request replacement accessories (Keyboards, Mice, Headphones etc) for your iPod/iPhone/Mac, you can use the Apple DIY Repair service... they basically send you out the new accessory, and you send back the old one... it's a lot easier than going through a call-center.