asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.22k stars 1.24k forks source link

Pyautogui can write punctuation but not alphabet characters on windows #761

Open EvelynGao233 opened 1 year ago

EvelynGao233 commented 1 year ago

Below is my test code. It only outputs ./?@#$

pyautogui.write("./?@#$hello", 0.25)

EvelynGao233 commented 1 year ago

It works fine on mac but not on windows

Candy-Cao commented 1 year ago

i have the same problem in centos, i can input upperlower letter but lower fail.

Candy-Cao commented 1 year ago

import pyautogui as ai xlib.xauth: warning, no xauthority details available

ai.write(' A' ) A>>> ai.write('a') X protocol error: <Class 'Xlib.error.badValue'> : code = 2, resource id sequence_number = 20, major_opco de = 134, minor_opcode = 2 X protocol error: <Class 'Xlib.error.badValue'> : : code = 2, resource id = sequence_number = 22, major_opco de = 134, minor_opcode = 2