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+- works
Ctrl+Shift+= (the usual Ctrl++) 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
viewMenu role for zoom, while the window is created with autoHideMenuBar: true.
- T3 does not currently expose any app-level
zoomIn / zoomOut / resetZoom commands 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+Plus
Ctrl+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()viawebContents.on("before-input-event", ...)instead of relying only on Electron's built-inviewMenuaccelerator path.The workaround handles these variants explicitly:
Ctrl+=Ctrl+Shift+=Ctrl+numaddCtrl+0(reset)Implementation shape was roughly:
apps/desktop/src/main.ts, after creating theBrowserWindowbefore-input-eventhandlerinput.control && !input.meta=,+,Equal, orNumpadAdd, call:window.webContents.setZoomLevel(window.webContents.getZoomLevel() + 0.5)0/Digit0/Numpad0, call:window.webContents.setZoomLevel(0)That workaround fixed
Ctrl++locally for me while keeping the rest of the app behavior unchanged.