Sorry, *Tighten's tie*
"black and yellow wire together" is what the problem is..
The USB plugs used a color code as follows.
VCC Red +5 VDC
2 D- White Data -
3 D+ Green Data +
4 GND Black Ground
PS2 connector keyboards and mice didn't have assigned color codes and various manufacturers used whatever color they wanted.
Since the plugs are molded and you can't trace the wiring you would be better off just to purchase a new keyboard.