"Ctrl++" does not zoom in on Linux/Wayland, while "Ctrl+-" works
Summary
On Linux/Wayland, Ctrl+- zooms out in the T3 Code desktop app, but Ctrl++ does not zoom back in.
On a US keyboard layout this means:
Ctrl+-worksCtrl+Shift+=(the usualCtrl++) does nothing
Reproduction
- Open the T3 Code desktop app.
- Press
Ctrl+-a few times. - Press
Ctrl+Shift+=to zoom back in.
Expected
Ctrl+Shift+= should zoom in.
Actual
Nothing happens. Zoom out works, but zoom in does not.
Environment
- T3 Code
0.0.3 - AUR package:
t3code-bin 0.0.3-1 - Packaged Electron runtime:
40.6.0 - Arch Linux
- Hyprland
- Wayland
Notes
- This does not appear to be caused by user keybindings. The user keybindings file only contains terminal / diff / chat / editor shortcuts and no zoom bindings.
- Zoom itself is wired correctly in at least one direction. Chromium persisted a negative zoom level in the app profile after
Ctrl+-, which suggests the zoom-out accelerator path is working while the zoom-in accelerator path is not. - From the shipped app code, the desktop shell appears to rely on Electron's built-in
viewMenurole for zoom, while the window is created withautoHideMenuBar: true. - T3 does not currently expose any app-level
zoomIn/zoomOut/resetZoomcommands in its own keybinding system.
This may be an Electron/Linux accelerator edge case rather than a T3-only logic bug, but T3 could likely work around it by explicitly handling zoom commands and supporting common zoom-in variants on Linux/Wayland:
Ctrl+=Ctrl+Shift+=Ctrl+PlusCtrl+numadd
Relevant code references
- Desktop menu uses
viewMenu:apps/desktop/src/main.ts - Window uses
autoHideMenuBar: true:apps/desktop/src/main.ts - Keybinding command set does not include zoom commands:
packages/contracts/src/keybindings.ts
I confirmed a local workaround on the same environment.
Patching the desktop Electron main process fixed it for me by handling zoom directly in createWindow() via webContents.on("before-input-event", ...) instead of relying only on Electron's built-in viewMenu accelerator path.
The workaround handles these variants explicitly:
Ctrl+=Ctrl+Shift+=Ctrl+numaddCtrl+0(reset)
Implementation shape was roughly:
- in
apps/desktop/src/main.ts, after creating theBrowserWindow - attach a
before-input-eventhandler - on Linux/Windows, when
input.control && !input.meta - if key/code matches
=,+,Equal, orNumpadAdd, call:window.webContents.setZoomLevel(window.webContents.getZoomLevel() + 0.5) - if key/code matches
0/Digit0/Numpad0, call:window.webContents.setZoomLevel(0)
That workaround fixed Ctrl++ locally for me while keeping the rest of the app behavior unchanged.
Seems to work with Ctrl+Shift+= but yeah it's inconsistent.
Same for Windows !
On 0.0.4 via xlaunch on wsl2 ubuntu, using a US keyboard:
- Zoom out -
Ctrl+-works - Zoom in -
Ctrl+Shift+=works (while the usualCtrl++does nothing)