Skip to content

"Ctrl++" does not zoom in on Linux/Wayland, while "Ctrl+-" works #281

Closed

Description

@johntheyoung

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

  1. Open the T3 Code desktop app.
  2. Press Ctrl+- a few times.
  3. 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

Activity

  1. johntheyoung commented on Mar 7, 2026

    @johntheyoung
    Author

    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+numadd
    • Ctrl+0 (reset)

    Implementation shape was roughly:

    • in apps/desktop/src/main.ts, after creating the BrowserWindow
    • attach a before-input-event handler
    • on Linux/Windows, when input.control && !input.meta
    • if key/code matches =, +, Equal, or NumpadAdd, 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.

  2. skaldebane commented on Mar 7, 2026

    @skaldebane

    Seems to work with Ctrl+Shift+= but yeah it's inconsistent.

  3. FrancoEscob commented on Mar 7, 2026

    @FrancoEscob

    Same for Windows !

  4. changed the title [-]Ctrl++ does not zoom in on Linux/Wayland, while Ctrl+- works[/-] [+]"Ctrl + +" does not zoom in on Linux/Wayland, while "Ctrl + -" works[/+] on Mar 8, 2026
  5. tewbamohammed-arch commented on Mar 8, 2026

    @tewbamohammed-arch

    On 0.0.4 via xlaunch on wsl2 ubuntu, using a US keyboard:

    • Zoom out - Ctrl+- works
    • Zoom in - Ctrl+Shift+= works (while the usual Ctrl++ does nothing)
  6. changed the title [-]"Ctrl + +" does not zoom in on Linux/Wayland, while "Ctrl + -" works[/-] [+]"Ctrl + +" does not zoom in on Linux/Wayland, while "Ctrl+-" works[/+] on Mar 8, 2026
  7. changed the title [-]"Ctrl + +" does not zoom in on Linux/Wayland, while "Ctrl+-" works[/-] [+]"Ctrl++" does not zoom in on Linux/Wayland, while "Ctrl+-" works[/+] on Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions