Base the key code switch on the selected keyboard layout