Skip to content

[Bug]: Middle-click paste does not work in integrated terminal on Linux (Wayland / KDE) #10921

Description

@grpace

What happened

Middle-clicking inside the integrated terminal window does nothing. To paste text into the terminal, the user is forced to either right-click and select "Paste" from the context menu, or press Ctrl + Shift + V.

Middle-click paste is the standard, foundational workflow across Linux terminal emulators (Konsole, Alacritty, GNOME Terminal, Kitty) as well as integrated terminals in other editors/IDEs (VS Code, JetBrains). It should work out of the box in T3 Code's terminal as well.

Steps to Reproduce

  1. Highlight any text in T3 Code or an external application (populating the Linux primary selection buffer).
  2. Move the cursor into the T3 Code integrated terminal pane.
  3. Middle-click (press the mouse wheel / Button 2).
  4. Result: Nothing happens. The click is ignored or swallowed.
  5. Expected: The highlighted text is pasted directly into the active terminal shell.

Technical Context

  • T3 Code's integrated terminal is rendered via xterm.js / canvas inside Electron.
  • In Chromium/Electron on Linux, middle-clicks (auxclick / event.button === 1) on canvas and non-input DOM elements are dropped or treated as autoscroll by default rather than triggering OS primary selection paste.
  • In editors like VS Code, the integrated terminal explicitly listens for middle-click pointer events and bridges the selection/clipboard buffer to the pty process.
  • When running natively on Wayland (--ozone-platform=wayland), handling needs to ensure primary selection protocol (wp_primary_selection_device_manager_v1) support is wired to the terminal component.

Environment

  • App Version: T3 Code (Alpha) v0.0.40 (AppImage)
  • OS: Fedora Linux 44 (KDE Plasma Desktop Edition)
  • Kernel: Linux 7.1.13-200.fc44.x86_64
  • Session Type: Wayland (XDG_SESSION_TYPE=wayland, --ozone-platform=wayland)
  • Desktop Environment: KDE Plasma

No activity

Activity on this issue will appear here.

Activity

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

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions