To clean a computer keyboard, unplug the keyboard, shake out loose debris and wipe the keys with a slightly damp cloth. To clean sticky or soiled keys, use a mixture of isopropyl alcohol and water.
If the keyboard is wireless, remove the batteries. When you shake out the loose debris, hold the keyboard upside down and shake gently. Some debris is likely to get caught on the keys. A can of compressed air helps remove any remaining chunks.
The keys themselves get dirty and greasy from regular use. For light cleaning, use a lightly moistened microfiber cloth. Wipe down each key with the cloth, and dry the keyboard when finished cleaning.
For dirtier keyboards, dip a cotton swab in a mixture of rubbing alcohol and water. A cloth slightly moistened with the mixture is also an option, but the cotton swab allows for more focus on the small keys. If you have particularly dirty keys, pop them off the keyboard carefully to wash them individually. This allows for harder scrubbing. Make sure that the keys are completely dry before putting them back on the keyboard.
Disinfecting wipes are another option for cleaning keyboards as long as they aren't dripping wet with cleaner. Wipe the keys with a clean, damp cloth after using the wipes, and dry the keys with a dry cloth at the end of the cleaning session.