Skip to content

Integrated terminal ignores Ctrl+Insert copy, breaking tiling-WM universal-clipboard shortcuts #8525

Description

@Gdsimms

What happened

Omarchy has a global copy-paste feature that works across both GUI and TUI apps and uses Cmd-C / Cmd-V (Super) instead of Ctrl-C / Ctrl-V for GUI apps, with a workaround for terminal apps to avoid clashing with Ctrl-C. In this environment copy and paste does not work in T3 Code. The only reliable way I've found to copy/paste in T3 Code under Omarchy is Ctrl+Shift+C / Ctrl+Shift+V. T3 Code is the only app I'm aware of with this behavior.

In the integrated terminal specifically: Super+C (Cmd+C) never fills the clipboard — a subsequent paste elsewhere yields the previous clipboard contents. Super+V (Cmd+V) does not paste. Right-click → Copy works. Copying from an assistant chat message works.

Diagnosis

Omarchy 4's "Universal copy/paste" (default/hypr/bindings/clipboard.lua) translates Super+C/Super+V to different chords depending on whether the focused window is a terminal:

  • Non-terminal window: Super+CCtrl+C, Super+VCtrl+V
  • Terminal window: Super+CCtrl+Insert, Super+VShift+Insert

"Terminal" is decided by window class (Alacritty|kitty|com.mitchellh.ghostty|foot|wezterm|org.omarchy.*|…). The T3 Code Desktop window class is t3code, which isn't in any such list, so by default Omarchy sends plain Ctrl+C / Ctrl+V. Ctrl+V is (reasonably) not a paste shortcut in the integrated terminal, so paste fails.

A user can add o.window("t3code", { tag = "+terminal" }) so Omarchy sends the terminal chords instead. Then paste works (Shift+Insert, added in #5982 / #5936), but copy still doesn't:

In apps/web/src/terminal/ghostty/surface.ts (confirmed on v0.0.35 and main):

export function isTerminalCopyShortcut(event, platform = navigator.platform) {
  if (event.key.toLowerCase() !== "c") return false;          // ← Ctrl+Insert never matches
  return isMacPlatform(platform) ? event.metaKey : event.ctrlKey;
}

export function isTerminalPasteShortcut(event, platform = navigator.platform) {
  const key = event.key.toLowerCase();
  if (key === "insert" && !isMacPlatform(platform)) {          // ← Shift+Insert handled
    return event.shiftKey && !event.ctrlKey && !event.metaKey;
  }
  if (key !== "v") return false;
  return isMacPlatform(platform) ? event.metaKey : event.ctrlKey && event.shiftKey;
}

Ctrl+Insert falls through to core.encodeKey() and is sent to the PTY instead of copying the selection. The paste path gained an Insert branch; the copy path never did.

Suggested fix: mirror the paste handling — treat Ctrl+Insert (no Shift, no Meta) as a copy shortcut in isTerminalCopyShortcut. Optionally, document a recommended window rule / class hint so tiling-WM universal-clipboard features (Omarchy, and similar setups in Hyprland/Sway/i3) recognise the integrated terminal.

Ctrl+Insert / Shift+Insert are the standard GTK/VTE terminal copy/paste bindings, so this also helps non-Omarchy users who use them by habit.

Steps to reproduce

  1. Omarchy 4 (Hyprland) desktop. In ~/.config/hypr/hyprland.lua add o.window("t3code", { tag = "+terminal" }) and reload Hyprland, so Omarchy routes the terminal clipboard chords to T3 Code.
  2. Open a thread in T3 Code Desktop, open the integrated terminal (Ctrl+J), run e.g. echo hello.
  3. Select hello with the mouse.
  4. Press Super+C (Omarchy sends Ctrl+Insert). Paste into any other app → you get the old clipboard contents; hello was never copied.
  5. Press Super+V with something on the clipboard (Omarchy sends Shift+Insert) → pastes correctly.

Without the window rule (default Omarchy): Super+C/Super+V send Ctrl+C/Ctrl+V; Ctrl+V inserts a literal ^V at the prompt.

Version

Desktop app t3code-bin 0.0.33-2 (AUR). The reporter has not yet retested on 0.0.35, but the isTerminalCopyShortcut gap above is present in v0.0.35 and main. Note: npx t3 triage reported "0.0.35" because it detected the npx CLI, not the installed desktop build — the running server (from the desktop app's bundle) is 0.0.33.

Environment

Arch Linux (kernel 7.1.8-arch1, MacBook Pro 2019 / T2), Omarchy 4.0.0.alpha, Hyprland 0.56.2, Wayland (--ozone-platform=wayland), Node v26.7.0. T3 Code Desktop t3code-bin 0.0.33-2; local (non-remote) thread environments.

Evidence

# /usr/share/omarchy/default/hypr/bindings/clipboard.lua
o.bind("SUPER + C", "Universal copy",  universal_clipboard_shortcut("CTRL", "C", "CTRL", "Insert"))
o.bind("SUPER + V", "Universal paste", universal_clipboard_shortcut("CTRL", "V", "SHIFT", "Insert"))
# terminal detection is by window class; T3 Code Desktop class = "t3code" (packaging/aur/t3code-bin/PKGBUILD: StartupWMClass=t3code)

# apps/web/src/terminal/ghostty/surface.ts @ v0.0.35
#   isTerminalCopyShortcut(): returns false unless event.key === "c"  -> Ctrl+Insert ignored
#   isTerminalPasteShortcut(): has an "insert" branch                 -> Shift+Insert handled

Related issues

Fix applied or workaround

None applied. Workarounds: use Ctrl+Shift+C / Ctrl+Shift+V, or right-click → Copy. Updating the desktop app to 0.0.35 (yay -S t3code-bin) plus o.window("t3code", { tag = "+terminal" }) restores paste via Super+V but not copy via Super+C.

Related observation (not part of this issue)

On 0.0.33, pasting via Ctrl+Shift+V at a bare shell prompt inserted literal bracketed-paste markers (^[[200~…). Needs re-confirmation on 0.0.35; if it reproduces it should be filed separately.

Filed by

claude (sonnet-5) via t3 triage

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