Ok so now your going to need a piece of scrap paper to write down the pinout and duty of both cables. You could also print out the picture of the Din 5 and PS/2 mini din pinouts found here http://www.pc-control.co.uk/keyboard_connector.htm.
The reason we want to do this is because the Data, Clock, Power, Ground and shielding wires on each keyboard is different in color.
Alright with that out of the way way we need to take out our multimeters and set it to "ohms" to check for continuity. If you are unsure of what the ohms setting is it just turn the switch of the multimeter to the symbol that looks like an upside down horseshoe. After you've done that touch both of your multimeter prongs together. You should hear an audible alert coming from your multimeter letting you know that you are receiving continuity.
Ok since we're just mapping things out it doesn't matter which cable you start with use but for the sake of order lets start with the PS/2 mini din cable. So take one of your multimeter prongs and place it on any single wire that use to be connected to your keyboard's pcb. Now take your other multimeter prong and touch the pins on the inside of the PS/2 mini din connector until you hear an audible alert from your multimeter. Once you've done that make a note of the color of the wire and the position of the pin on your pinout page/ scrap paper. Now using the print out of the PS/2 mini din pinout we know the duty of the wire.
For example if the color of the wire was red and you were receiving continuity from pin 5 then we now know that pin 5 is power.
Now repeat this step to until you know the duty of each wire.