Here is your Ripley’s Believe It or Not for the day.
In Python 3.x there does not appear to be any reasonably simple way to get (and process) a single keypress as a user types input. As Joan Rivers used to say: “Discuss”.
Doing it using tkinter is easy – see Keystroke Demo. Doing it in PySimpleGUI is even easier.