I can not think of any reputable name for the software you need but what you are looking for is remapping keyboard software. And as far as I know there is no open source so you will have to pay for it. Probably cheaper to buy a new keyboard

I actually made the same mistake when I bought a keyboard for my media center that had a mouse pad on it with no way have a middle mouse click and until recently had no reliable way to disable F1 to F12 from media key's to a normal keyboard.