How to type @ using pyautogui

2019-09-20 20:32发布

问题:

I am using pyautogui in python 2.7.x and I need to write the character "@". I've tried everything I know but I got no results. What code line/s should let me write the "@"?

回答1:

Maybe you can try use the following code:

import pyautogui
pyautogui.hotkey('shift', '2')

If that does not work, try replacing hotkey with hotkeys