Skip to content

Using SetConsoleMode to set/clear ENABLE_MOUSE_INPUT does not take effect (unless a WriteConsoleW call occurs as well) #15711

@chrisant996

Description

@chrisant996

Windows Terminal version

1.18.1462.0

Windows build number

10.0.19045.3208

Other Software

I've provided a minimal standalone repro here to eliminate dependencies on anything other than Terminal.
But for completeness: this was discovered in the context of Clink.

Steps to reproduce

This is a regression in 1.18; the problem does not exist in 1.17 and earlier.

Minimal repro program is available at https://github.com/chrisant996/repro_enable_mouse_input.
The repo also includes a pre-built code-signed Repro.exe executable.

See the Readme.md file in that repo for full details and repro instructions.

  1. Start Windows Terminal 1.18
  2. Run the Repro.exe program from the repro_enable_mouse_input repo (you can build it yourself from the sources, or you can run the pre-built code-signed copy)
  3. Move the mouse over the terminal window; you should see no output
  4. Click the primary mouse button on the terminal window; you should see no output
  5. Hold Ctrl+Alt and move the mouse or click the mouse button

Expected Behavior

  • You should see output acknowledging that ReadConsoleInputW received mouse input records.

Actual Behavior

  • Terminal 1.18 -- there is no output (incorrect behavior).
  • Terminal 1.17 -- the output reports received mouse input records (correct behavior).

Metadata

Metadata

Assignees

Labels

Area-ServerDown in the muck of API call servicing, interprocess communication, eventing, etc.Area-VTVirtual Terminal sequence supportIn-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-1A description (P1)Product-ConptyFor console issues specifically related to conptySeverity-BlockingWe won't ship a release like this! No-siree.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions