Skip to content

feat: add option to enable zoom with ctrl + scroll #19127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

paulinek13
Copy link
Contributor

@paulinek13 paulinek13 commented Jul 14, 2025

Summary of the Pull Request

Introduces a setting to enable/disable font size changes in the terminal when holding Ctrl and scrolling, giving users more control over zoom actions.

References and Relevant Issues

#11710
#5708
#3793
#11906
#3990
#14627

Detailed Description of the Pull Request / Additional comments

This PR adds a new global setting scrollToZoom that allows users to enable font zooming with scrolling. When disabled, this setting prevents accidental font size changes that can occur when users scroll while holding the Ctrl key.

Note: after disabling this setting, users may still change font size using Ctrl+ and Ctrl- keyboard shortcuts. Other Ctrl+Scroll functionality (like transparency adjustments) remains unaffected.

Validation Steps Performed

  • For testing, I built the project with Invoke-OpenConsoleBuild -m "-p:Configuration=Release,Platform=x64" and registered it using \repos\terminal\src\cascadia\CascadiaPackage\bin\x64\Release\AppxManifest.xml
image
  • Verified the setting can be toggled in the Settings UI (Interaction tab)
image
  • Confirmed that when disabled, holding Ctrl and scrolling no longer changes font size

  • Validated that the setting persists across terminal restarts

PR Checklist


Note: I used the existing FocusFollowMouse setting as a reference for implementing this.

Introduces a setting to prevent font zooming when using Ctrl+mouse wheel,
giving users more control over accidental zoom actions.
@Lo0oG
Copy link

Lo0oG commented Jul 14, 2025

Just wondering if instead of being "Disable zooming with Ctrl+mouse wheel" the option was switched to the other way and was "Zoom with Ctrl+mouse wheel".
Avoids the double negative of Disable zooming with Ctrl+mouse wheel : Off.

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code itself is solid. Thanks for doing this! 😊

My only holdup is the wording used. I think it's worth avoiding the double negative as @Lo0oG mentioned.

Some other miscellaneous work here:

  • please update the docs on our docs repo
  • update the list of references and relevant issues to use the "Closes" keyword
    • this automatically closes the issues when the PR merges. Looks like you can close #11710, #3990, and #11906
    • 💡Pro Tip: "Closes #11710, #3990, #11906" should be smart enough to close all 3 issues, rather than repeated "Closes" over and over again EDIT: nope, you've gotta put "Closes" before each one
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 14, 2025
@DHowett
Copy link
Member

DHowett commented Jul 15, 2025

💡Pro Tip: "Closes #11710, #3990, #11906" should be smart enough to close all 3 issues, rather than repeated "Closes" over and over again

@carlos-zamora it's actually not. It does not work, and the standard for our project is indeed to put each Closes on its own line.

Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 15, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Area-Input Related to input processing (key presses, mouse, etc.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Area-Settings Issues related to settings and customizability, for console or terminal Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Priority-2 A description (P2) Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. labels Jul 15, 2025
@paulinek13 paulinek13 force-pushed the feat/11710/setting_to_disable_zooming branch from c0e5e68 to 4e915d0 Compare July 15, 2025 15:35
@paulinek13
Copy link
Contributor Author

Thanks for the reviews and comments! I've addressed them. I'll open a PR for the docs update shortly 😃

@paulinek13 paulinek13 changed the title feat: add option to disable mouse zoom with Ctrl+wheel Jul 15, 2025
@paulinek13 paulinek13 changed the title feat: add option to enable mouse zoom with ctrl + wheel Jul 15, 2025
@paulinek13 paulinek13 changed the title feat: add option to enable mouse zoom with ctrl + mouse wheel Jul 15, 2025
@paulinek13 paulinek13 changed the title feat: add option to enable zoom with ctrl + mouse wheel Jul 15, 2025
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only thing is that we should set the default value to true throughout. That way, we don't accidentally disable it for everybody haha. But I think that's the last bit of feedback I have. Good work! 😊

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 15, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 15, 2025
@DHowett
Copy link
Member

DHowett commented Jul 16, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).
@DHowett
Copy link
Member

DHowett commented Jul 16, 2025

@jsoref This is a weird case. This PR includes the spelling 0.0.25 changes from main, and it has run and passed, but all the Report phases are being "Skipped" (?) and we aren't getting "security scanning" results. I'm sure I'm just missing something, but... wat

@jsoref
Copy link
Contributor

jsoref commented Jul 16, 2025

https://github.com/microsoft/terminal/actions/runs/16312069474/job/46126597737#step:2:12

use_sarif: false

I'd have to trace ...

https://github.com/microsoft/terminal/actions/runs/16312069474/workflow#L107

      use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }}

Sigh. Just change this to use_sarif: 1

I think I must have changed it for a different Microsoft repository.

@DHowett
Copy link
Member

DHowett commented Jul 16, 2025

I'd have to trace ...

2025-07-16T20:09:15.2910498Z ##[debug]Evaluating: ((!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1)
2025-07-16T20:09:15.2911586Z ##[debug]Evaluating And:
2025-07-16T20:09:15.2912149Z ##[debug]..Evaluating Or:
2025-07-16T20:09:15.2914436Z ##[debug]....Evaluating Not:
2025-07-16T20:09:15.2915743Z ##[debug]......Evaluating Index:
2025-07-16T20:09:15.2916303Z ##[debug]........Evaluating Index:
2025-07-16T20:09:15.2916843Z ##[debug]..........Evaluating github:
2025-07-16T20:09:15.2917429Z ##[debug]..........=> Object
2025-07-16T20:09:15.2917974Z ##[debug]..........Evaluating String:
2025-07-16T20:09:15.2918522Z ##[debug]..........=> 'event'
2025-07-16T20:09:15.2919046Z ##[debug]........=> Object
2025-07-16T20:09:15.2919538Z ##[debug]........Evaluating String:
2025-07-16T20:09:15.2920078Z ##[debug]........=> 'pull_request'
2025-07-16T20:09:15.2920697Z ##[debug]......=> Object
2025-07-16T20:09:15.2921178Z ##[debug]....=> false
2025-07-16T20:09:15.2921923Z ##[debug]....Evaluating Equal:
2025-07-16T20:09:15.2923183Z ##[debug]......Evaluating Index:
2025-07-16T20:09:15.2923740Z ##[debug]........Evaluating Index:
2025-07-16T20:09:15.2924479Z ##[debug]..........Evaluating Index:
2025-07-16T20:09:15.2925021Z ##[debug]............Evaluating Index:
2025-07-16T20:09:15.2925573Z ##[debug]..............Evaluating Index:
2025-07-16T20:09:15.2926209Z ##[debug]................Evaluating github:
2025-07-16T20:09:15.2926804Z ##[debug]................=> Object
2025-07-16T20:09:15.2927360Z ##[debug]................Evaluating String:
2025-07-16T20:09:15.2928193Z ##[debug]................=> 'event'
2025-07-16T20:09:15.2928771Z ##[debug]..............=> Object
2025-07-16T20:09:15.2929306Z ##[debug]..............Evaluating String:
2025-07-16T20:09:15.2929876Z ##[debug]..............=> 'pull_request'
2025-07-16T20:09:15.2930437Z ##[debug]............=> Object
2025-07-16T20:09:15.2930990Z ##[debug]............Evaluating String:
2025-07-16T20:09:15.2931725Z ##[debug]............=> 'head'
2025-07-16T20:09:15.2932296Z ##[debug]..........=> Object
2025-07-16T20:09:15.2932810Z ##[debug]..........Evaluating String:
2025-07-16T20:09:15.2933338Z ##[debug]..........=> 'repo'
2025-07-16T20:09:15.2933975Z ##[debug]........=> Object
2025-07-16T20:09:15.2934482Z ##[debug]........Evaluating String:
2025-07-16T20:09:15.2935012Z ##[debug]........=> 'full_name'
2025-07-16T20:09:15.2935615Z ##[debug]......=> 'paulinek13/terminal'
2025-07-16T20:09:15.2936198Z ##[debug]......Evaluating Index:
2025-07-16T20:09:15.2936720Z ##[debug]........Evaluating github:
2025-07-16T20:09:15.2937273Z ##[debug]........=> Object
2025-07-16T20:09:15.2937761Z ##[debug]........Evaluating String:
2025-07-16T20:09:15.2938299Z ##[debug]........=> 'repository'
2025-07-16T20:09:15.2938868Z ##[debug]......=> 'microsoft/terminal'
2025-07-16T20:09:15.2939859Z ##[debug]....=> false
2025-07-16T20:09:15.2940529Z ##[debug]..=> false
2025-07-16T20:09:15.2941140Z ##[debug]=> false
2025-07-16T20:09:15.2945400Z ##[debug]Expanded: ((!Object || ('paulinek13/terminal' == 'microsoft/terminal')) && 1)
@jsoref
Copy link
Contributor

jsoref commented Jul 16, 2025

Yep, change that line to just use_sarif: 1 -- get rid of the fancy logic (the fancy logic can't work with rulesets).

I've updated https://docs.check-spelling.dev/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset.html#migration

@DHowett
Copy link
Member

DHowett commented Jul 16, 2025

Thanks @jsoref - just merged that in 🙂
check-spelling is still the GOAT

@DHowett
Copy link
Member

DHowett commented Jul 17, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).
…resw

Co-authored-by: Dustin L. Howett <dustin@howett.net>
@DHowett
Copy link
Member

DHowett commented Jul 17, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).
@DHowett DHowett enabled auto-merge (squash) July 17, 2025 21:34
@DHowett
Copy link
Member

DHowett commented Jul 17, 2025

thank you so much - folks are gonna love it

@DHowett DHowett merged commit a04e410 into microsoft:main Jul 17, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Area-Settings Issues related to settings and customizability, for console or terminal Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-2 A description (P2) Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal.
5 participants