Hey there, thanks for the reply. I've only recently begun programming (in Python; no experience with Javascript), so looking for solutions on Stack Overflow was the best I could do.
If my suggestion re: keypress vs. keycode didn't work, all I can think of is a clumsy workaround: Allow players to map their controls, i.e. instead of asking players which button they want to press for up/down/left/right/jump/shoot, here ask them which button to press for question mark, period, dash, full stop, etc.