Hacky keybdmap implementation to get OSX up and running; need to re-evaluate this later (we are now sharing lots of the same code between platforms).