user16410067
user16410067

Reputation:

Why does pyautogui type 7 instead of &

import time
time.sleep(10)
time.sleep(1.4)
pyautogui.click(400, 43, 2)

time.sleep(2.4)
pyautogui.write(
    "&"
)

Why does pyautogui type 7 instead of "&" this is the only button i have issues with May be because of 7 and "&" being the same button Also i am using mac os python version used is 3.8.0 Same issue with .press in pyautogui too! Ive tried command v that works but i need a different solution. Thanks in advance for the help i appreciate it!

Upvotes: 1

Views: 288

Answers (1)

AaYan Yasin
AaYan Yasin

Reputation: 490

Because it presses the key without shift and ends up pressing 7, so try to press a hotkey which is :

pyautogui.hotkey('shift'+'&')

OR

pyautogui.hotkey('shift'+'7')

One of these would definitely work now.

Concept is to press shift first then 7 so it goes to & key.

Upvotes: 1

Related Questions