Usually, the wires are colour coded to facilitate such tasks.
Even if they aren't, you can't really do wrong. GND should be fairly self-explanatory, as is VCC. Then you'll just need to figure out where each of the two data lines goes, but if you mess up, the keyboard will just not work, so you can swap the data lines and try again.
-huha