Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
If recovery mode does not work try DFU mode.
For the keyboard:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Restore from backup. See:
- Restore to factory settings/new iOS device.
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.