Skip to content

Mouse cannot select text with pyautogui #16268

@ebundy

Description

@ebundy

Windows Terminal version

1.17.11461.0

Windows build number

10.0.19045.3570

Other Software

python 3.10, pyautogui 0.9.5 (The exact versions doesn't matter actually)

Steps to reproduce

Install the pyautogui library (The version doesn't matter).
Execute the following code and you have 3 seconds to switch to the terminal and position the cursor on any text.

from time import sleep

import pyautogui
from pyautogui import Point

sleep(3)
pyautogui.click()
pyautogui.mouseDown(button='left')
for i in range(50):
    position: Point = pyautogui.position()
    pyautogui.moveTo(position.x + 4, position.y)
pyautogui.mouseUp(button='left')

Expected Behavior

The text where the cursor is positioned starts to be selected towards the right.
FYI : I tested that code on other terminals like classic windows terminal, Git Bash and WSL2 and the problem doesn't occur.

Actual Behavior

The cursor is positioned at the right place and progress to the right as expected but no selection happens.
ezgif-1-639c7a0728

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-BugIt either shouldn't be doing this or needs an investigation.Priority-3A description (P3)Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions