[PR #2700] [MERGED] Add keyboard shortcuts to increase and decrease font size #25032

Open
opened 2026-01-31 09:06:50 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2700
Author: @dsafa
Created: 9/9/2019
Status: Merged
Merged: 9/30/2019
Merged by: @zadjii-msft

Base: masterHead: add-fontsize-update-bindings


📝 Commits (5)

  • eace996 Hook up font size key bindings and events
  • e0c932b Combine increase and decrease font size events
  • 9b89f15 Merge branch 'master' into add-fontsize-update-bindings
  • 21f4886 Add zoom keybindings to defaults.json
  • e48c651 Fix whitespace

📊 Changes

13 files changed (+58 additions, -6 deletions)

View changed files

📝 src/cascadia/TerminalApp/ActionArgs.cpp (+1 -0)
📝 src/cascadia/TerminalApp/ActionArgs.h (+6 -0)
📝 src/cascadia/TerminalApp/ActionArgs.idl (+4 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+10 -0)
📝 src/cascadia/TerminalApp/AppKeyBindings.cpp (+16 -0)
📝 src/cascadia/TerminalApp/AppKeyBindings.h (+1 -2)
📝 src/cascadia/TerminalApp/AppKeyBindings.idl (+1 -2)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.h (+1 -0)
📝 src/cascadia/TerminalApp/defaults.json (+3 -1)
📝 src/cascadia/TerminalControl/TermControl.cpp (+10 -1)
📝 src/cascadia/TerminalControl/TermControl.h (+2 -0)
📝 src/cascadia/TerminalControl/TermControl.idl (+2 -0)

📄 Description

Summary of the Pull Request

This hooks up the already existing shortcut actions for increasing and decreasing font size so that keyboard shortcuts can be used. Also adds default shortcuts ctrl+= and ctrl+- for increasing and decreasing font size.

References

A previous PR was done for this feature but was closed and never completed: #1740 . This is a continuation of that work.

PR Checklist

  • Closes Unable to use backslash on any shell (#1708)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed. No new tests added
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

There were already actions increaseFontSize and decreaseFontSize that existed but without anything to handle them. The handler shares existing functionality for adjusting font size that already exists with ctrl and scrolling.

Validation Steps Performed

  1. Add keybindings to profiles.json for decreaseFontSize and increaseFontSize
  2. Verified that both keybindings work.
  3. Verified that ctrl + scrolling still works.

1. Delete profiles.json and let terminal generate a default one.
2. Verified that the default keybindings are created. No longer needed with defaults.json


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/2700 **Author:** [@dsafa](https://github.com/dsafa) **Created:** 9/9/2019 **Status:** ✅ Merged **Merged:** 9/30/2019 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `master` ← **Head:** `add-fontsize-update-bindings` --- ### 📝 Commits (5) - [`eace996`](https://github.com/microsoft/terminal/commit/eace996e34adbea4029f19700ddc29a4db260e8e) Hook up font size key bindings and events - [`e0c932b`](https://github.com/microsoft/terminal/commit/e0c932bdb15868b05b25aa7d76c034dadf02a285) Combine increase and decrease font size events - [`9b89f15`](https://github.com/microsoft/terminal/commit/9b89f15da061a26d998cc31d066c92339afe5630) Merge branch 'master' into add-fontsize-update-bindings - [`21f4886`](https://github.com/microsoft/terminal/commit/21f4886e9d68bccfe04b2dd005e5fe8823d9706b) Add zoom keybindings to defaults.json - [`e48c651`](https://github.com/microsoft/terminal/commit/e48c6516d1c0a3b2ad6cb8ab01acb5bfdfaa1477) Fix whitespace ### 📊 Changes **13 files changed** (+58 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/ActionArgs.cpp` (+1 -0) 📝 `src/cascadia/TerminalApp/ActionArgs.h` (+6 -0) 📝 `src/cascadia/TerminalApp/ActionArgs.idl` (+4 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+10 -0) 📝 `src/cascadia/TerminalApp/AppKeyBindings.cpp` (+16 -0) 📝 `src/cascadia/TerminalApp/AppKeyBindings.h` (+1 -2) 📝 `src/cascadia/TerminalApp/AppKeyBindings.idl` (+1 -2) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+1 -0) 📝 `src/cascadia/TerminalApp/defaults.json` (+3 -1) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+10 -1) 📝 `src/cascadia/TerminalControl/TermControl.h` (+2 -0) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+2 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This hooks up the already existing shortcut actions for increasing and decreasing font size so that keyboard shortcuts can be used. Also adds default shortcuts `ctrl+=` and `ctrl+-` for increasing and decreasing font size. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References A previous PR was done for this feature but was closed and never completed: #1740 . This is a continuation of that work. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1708 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed. **No new tests added** * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments There were already actions `increaseFontSize` and `decreaseFontSize` that existed but without anything to handle them. The handler shares existing functionality for adjusting font size that already exists with ctrl and scrolling. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Add keybindings to `profiles.json` for `decreaseFontSize` and `increaseFontSize` 2. Verified that both keybindings work. 3. Verified that ctrl + scrolling still works. ~~1. Delete `profiles.json` and let terminal generate a default one.~~ ~~2. Verified that the default keybindings are created.~~ No longer needed with `defaults.json` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:06:50 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25032