Is it okay to have 26 cases using switch? Or do I just have to live with it?
Aside from a lookup table, using a switch statement is probably the most efficient option. The compiler might actually rewrite the switch statement to use a lookup table, but it's not required to. However, using a lookup table would require a lot of boilerplate unless the switch statement is just mapping key codes to character values, which doesn't seem to be the case, so I'd go with the switch statement unless this code became a major bottleneck (which is quite unlikely).
Looks like Álvaro got to it before me.