I am trying to write a function that will receive an ascii key and will convert it to a Virtual-key-code.
Ex:
from msvcrt import getch
key= ord(getch()) #getting the ASCII character for a key that was pressed
def(key):
#converting the key to virtual key code
for example: the ascii code of a is 41. I want the function to receive it and return 0x41-which is the virtual key code of the key.
Thank you in advance for any help!