prior to windows 2000, device drivers had to be written to modify scan codes.
Microsoft incorporated this feature into their operating system, thereby allowing fools like you and me to hack our registry and change the values to anything we see fit.