使用python pyautogui按altright或AltGr时Xlib错误BadValue

问题描述

当我用 pyautogui 写 { 时出现这个错误

我需要按 AltGr 或 Altright + '

我收到此错误

 pyautogui.press('altright')

 X protocol error:
  <class 'Xlib.error.BadValue'>: code = 2,resource_id = 0,sequence_number = 16,major_opcode = 132,minor_opcode = 2
 X protocol error:
 <class 'Xlib.error.BadValue'>: code = 2,sequence_number = 18,minor_opcode = 2

即使我按下

pyautogui.hotkey("altright","'",interval=0.1)

相同的结果

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)