The ASCII-code is long since deprecated, don't do that.
There are more modern ways, and both Godot as well as C++ offer extensive methods of handling keyboard input. You don't want to limit yourself to the few characters ASCII 7bit offered back in the day, even if you're doing a retro game.
You'd exclude all those language specific keyboards out there. But these problems were solved long ago.