I have to know what key is pressed, but not need the code of the Character, i want to know when someone press the 'A' key even if the key obtained is 'a' or 'A', and so with all other keys.
I can't use PyGame or any other library (including Tkinter). Only Python Standard Library. And this have to be done in a terminal, not a graphical interface.
NOT NEED THE CHARACTER CODE. I NEED TO KNOW THE KEY CODE.
Ex:
ord('a') != ord('A') # 97 != 65
someFunction('a') == someFunction('A') # a_code == A_code
The obvious answer:
or, in other (key)words:
etc...
Here is a implementation of the getch function, that would work in both Windows and Linux platforms, based on this recipe: