Updated input translation to use maps instead of excessive switches.