A more effective method is to use compressed air. Compressed air is pressurized air contained in a can with a very long nozzle. Simply aim the air between the keys and blow away all of the dust and debris that has gathered there.
Before cleaning the keyboard first turn off the computer or if youre using a USB keyboard simply unplug it. Not unplugging the keyboard can result in causing other computer problems as you may press keys that cause the computer to perform a task you dont want it to do. Be careful when you use a vacum cleaner, but make sure the keyboard doesnt have loose pop off keys that could possibly be sucked up by the vacuum.