Skip to content

Show hand cursor when Ctrl-hovering hyperlinks#20102

Open
bcullman wants to merge 3 commits intomicrosoft:mainfrom
bcullman:ctrl-hover-link-pointer
Open

Show hand cursor when Ctrl-hovering hyperlinks#20102
bcullman wants to merge 3 commits intomicrosoft:mainfrom
bcullman:ctrl-hover-link-pointer

Conversation

@bcullman
Copy link
Copy Markdown

@bcullman bcullman commented Apr 10, 2026

Summary of the Pull Request

Show a hand cursor when the user holds Ctrl while hovering a hyperlink in Windows Terminal.

References and Relevant Issues

Closes #7563

Detailed Description of the Pull Request / Additional comments

This change updates TermControl to temporarily override the pointer cursor with a hand cursor when all of the following are true:

  • the pointer device is a mouse
  • Ctrl is pressed
  • the hovered text resolves to a hyperlink

The cursor override is refreshed on pointer movement and on Ctrl key transitions, so pressing or releasing Ctrl while the mouse remains stationary over a hyperlink updates the cursor immediately.

The previous cursor is restored when the condition no longer applies, including on:

  • pointer exit
  • focus loss
  • control close

This keeps the existing hyperlink activation behavior unchanged: links still open with Ctrl+Click.

Validation Steps Performed

  • Built src/cascadia/UnitTests_Control/Control.UnitTests.vcxproj
  • Ran Control.Unit.Tests.dll successfully
  • Built and launched WindowsTerminal.exe locally
  • Manually verified:
    • hovering a hyperlink without Ctrl does not show a hand cursor
    • pressing Ctrl while hovering a hyperlink switches to the hand cursor immediately
    • releasing Ctrl restores the previous cursor immediately
    • moving off the hyperlink restores the previous cursor
    • Ctrl+Click still opens the hyperlink
    • no stale hand cursor remains after pointer exit, focus loss, or app close
    • When a hovered hyperlink moves out from under a stationary mouse while Ctrl remains pressed, the cursor reverts from hand to normal

PR Checklist

@bcullman
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Apr 10, 2026
@bcullman
Copy link
Copy Markdown
Author

@DHowett
Copy link
Copy Markdown
Member

DHowett commented Apr 10, 2026

Don't worry, all of the right people already get notifications for pull requests :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change pointer when hovering over a link

2 participants