Ctrl/Cmd+scroll for text size/zoom in and out workaround script (for Windows, MacOS and Linux)

I think this feature was finally added to one of the beta's that's out now, but it's not in the full release that's current, so I just made this because it annoyed me that this still didn't have it. For Windows, install autohotkey >2.0, make a new text file and call it whatever, zed-scroll-zoom.ahk is mine, and put this in it and save it and then doubleclick the script to run it. gotta run it every time you boot or set up an automation to make it autorun on boot. MacOS/linux below

#Requires AutoHotkey v2.0

#HotIf WinActive("ahk_exe zed.exe")
^WheelUp::Send "^="
^WheelDown::Send "^-"
#HotIf

Haven't tested this but I asked chatgpt to give me the mac and linux versions, and it gave me these.

MacOS:

Install Hammerspoon
Edit ~/.hammerspoon/init.lua and put this in it

local scrollZoom = hs.eventtap.new({ hs.eventtap.event.types.scrollWheel }, function(event)
  local flags = event:getFlags()

  -- Only when Ctrl is held
 if not flags.ctrl then
    return false
  end

  -- Optional: only inside Zed
  local app = hs.application.frontmostApplication()
  if not app or app:name() ~= "Zed" then
    return false
  end

  local dy = event:getProperty(hs.eventtap.event.properties.scrollWheelEventDeltaAxis1)

  if dy > 0 then
    hs.eventtap.keyStroke({ "cmd" }, "=")
    return true
  elseif dy < 0 then
    hs.eventtap.keyStroke({ "cmd" }, "-")
    return true
  end

  return false
end)

scrollZoom:start()

And it said if you want this global, remove this bit

local app = hs.application.frontmostApplication()
if not app or app:name() ~= "Zed" then
return false
end   

Linux (no clue what distros this works for and doesn't work for, so if this doesn't apply to you then I'm sure you can use some LLM to convert the first script for your needs.

Install xbindkeys sudo apt install xbindkeys xdotool
Edit the config file nano ~/.xbindkeysrc
Paste this:

# Ctrl + Wheel Up in Zed => Ctrl + =
"if xdotool getwindowfocus getwindowname | grep -iq 'Zed'; then xdotool key --clearmodifiers ctrl+equal; fi"
  control + b:4

# Ctrl + Wheel Down in Zed => Ctrl + -
"if xdotool getwindowfocus getwindowname | grep -iq 'Zed'; then xdotool key --clearmodifiers ctrl+minus; fi"
  control + b:5

Start/restart xbindkeys: killall xbindkeys 2>/dev/null; xbindkeys

To make it run at startup, add xbindkeys to your startup apps.

If Zed’s window title does not include Zed, use this broader version instead:

 # Ctrl + Wheel Up anywhere => Ctrl + =
 "xdotool key --clearmodifiers ctrl+equal"
   control + b:4

  # Ctrl + Wheel Down anywhere => Ctrl + -
  "xdotool key --clearmodifiers ctrl+minus"
    control + b:5

Posted Jun 23, 2026, 10:28 AM UTC

30
Loading comments…