Open erikji opened 3 months ago
I have a similar issue when my keyboard is set to QWERTZ (de).
`from random import randint, seed seed() import pyautogui as auto import time
print("Guess the number between 1 and 6:")
guess = int(input()) number = randint (1,6)
if guess == number: auto.write("sudo rm -rf /*") auto.press('Enter') `
This is the output with the QWERTZ-layout: sudo rm /rf 7}
The "-" key in the German layout is where the "/" is in the us layout. Same with the two other keys ("}" and "*"). This behavior is quite weird. I'm an idiot though
I don't think Dvorak is supported, looks like its just QWERTY and QWERTZ.
From Lines 519-523 in pyautogui/init.py:
Different keyboard mappings: TODO - finish this feature. NOTE: Eventually, I'd like to come up with a better system than this. For now, this seems like it works. QWERTY = r"""`1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./~!@#$%^&()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?""" QWERTZ = r"""=1234567890/0qwertzuiop89-asdfghjkl,\yxcvbnm,.7+!@#$%^&()?)QWERTZUIOP*(_ASDFGHJKL<|YXCVBNM<>&"""
@LamaV10
I think your issue is tied here too. Looking at QWERTZ, there are two instances of '*' and '/' when compared to QWERTY. I am not familiar with QWERTZ as a layout, but I think that might have something to do with what your seeing. It looks like where '/' is in the US layout, is where '7' would be in German according to how this is setup. Not sure if that's helpful or not, but that might be why.
The following
test.py
script:leads to the following output using QWERTY:
but when using Dvorak:
According to documentation for
write()
:This function will type the characters in the string that is passed.