Charging an iPad battery is as easy as connecting the iPad to a computer via a USB port or to a wall outlet. But not all USB ports are created equal. Even though you have a USB port on your keyboard and can sync the iPad through it, you can't always charge its battery that way.
This is because the iPad requires a higher amount of electricity to charge its battery than the USB ports on most keyboards can provide. These ports are sufficient to sync the iPad, but not charge it.
So, if you need you need to charge your iPad, connect it directly to your computer or a wall outlet, not your keyboard.