Changed the design of the key mapping classes.

I was getting tired of writing ifdef in a bunch of places
so I changed the design to include a bridge class.