Skip to content

Add ZoomIn and ZoomOut actions for independent zoom control#44587

Merged
maxbrunsfeld merged 4 commits intozed-industries:mainfrom
pedroni:workspace-zoom-in-zoom-out
Dec 15, 2025
Merged

Add ZoomIn and ZoomOut actions for independent zoom control#44587
maxbrunsfeld merged 4 commits intozed-industries:mainfrom
pedroni:workspace-zoom-in-zoom-out

Conversation

@pedroni
Copy link
Contributor

@pedroni pedroni commented Dec 11, 2025

Closes #14472

Introduces workspace::ZoomIn and workspace::ZoomOut actions that complement the existing workspace::ToggleZoom action. ZoomIn only zooms if not already zoomed, and ZoomOut only zooms out if currently zoomed. This enables composing zoom actions with workspace::SendKeystrokes for workflows like "focus terminal then zoom in".

Example usage

Example keybindings:

[
  {
    "bindings": {
      "ctrl-cmd-,": "terminal_panel::ToggleFocus",
      "ctrl-cmd-.": "workspace::ZoomIn",
    }
  },
  {
    "context": "Terminal",
    "bindings": {
      "cmd-.": "terminal_panel::ToggleFocus"
    }
  },
  {
    "context": "!Terminal",
    "bindings": {
      "cmd-.": ["workspace::SendKeystrokes", "ctrl-cmd-, ctrl-cmd-."]
    }
  },
]

Demo:

Screen.Recording.2025-12-10.at.21.32.41.mov

Release Notes:

  • Added the actions: workspace::ZoomIn and workspace::ZoomOut that complement the existing workspace::ToggleZoom action

@cla-bot
Copy link

cla-bot bot commented Dec 11, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @pedroni on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Dec 11, 2025

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against 2c57f6d

@pedroni
Copy link
Contributor Author

pedroni commented Dec 11, 2025

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 11, 2025
@cla-bot
Copy link

cla-bot bot commented Dec 11, 2025

The cla-bot has been summoned, and re-checked this pull request!

@maxbrunsfeld
Copy link
Collaborator

Makes perfect sense, thank you @pedroni .

At some point, I'd love to have a way to sequence multiple actions directly, without having to use SendKeystrokes, but in the meantime, these actions fit in well.

@maxbrunsfeld maxbrunsfeld merged commit 9e11aae into zed-industries:main Dec 15, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Quality Week – December 2025 Dec 15, 2025
CherryWorm pushed a commit to CherryWorm/zed that referenced this pull request Dec 16, 2025
…stries#44587)

Closes zed-industries#14472

Introduces `workspace::ZoomIn` and `workspace::ZoomOut` actions that
complement the existing `workspace::ToggleZoom` action. ZoomIn only
zooms if not already zoomed, and ZoomOut only zooms out if currently
zoomed. This enables composing zoom actions with
`workspace::SendKeystrokes` for workflows like "focus terminal then zoom
in".


<details><summary>Example usage</summary>
<p>

Example keybindings:

```json
[
  {
    "bindings": {
      "ctrl-cmd-,": "terminal_panel::ToggleFocus",
      "ctrl-cmd-.": "workspace::ZoomIn",
    }
  },
  {
    "context": "Terminal",
    "bindings": {
      "cmd-.": "terminal_panel::ToggleFocus"
    }
  },
  {
    "context": "!Terminal",
    "bindings": {
      "cmd-.": ["workspace::SendKeystrokes", "ctrl-cmd-, ctrl-cmd-."]
    }
  },
]
```

Demo:


https://github.com/user-attachments/assets/1b1deda9-7775-4d78-a281-dc9622032ead

</p>
</details> 



Release Notes: 

- Added the actions: `workspace::ZoomIn` and `workspace::ZoomOut` that
complement the existing `workspace::ToggleZoom` action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

Development

Successfully merging this pull request may close these issues.

Terminal shortcuts

3 participants