[Bug]: Omarchy Super+V / Ctrl+V doesn't paste in the Linux integrated terminal; sends raw ^V and garbles the prompt

Aperta Adatta ai principianti
#34,134 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
83/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
desktop

Direzione di ricerca

Inizia da apps/web/src/terminal/ghostty/surface.ts e leggi isTerminalPasteShortcut, che, secondo quanto indicato dall’issue, consente a Ctrl+V di raggiungere core.encodeKey() su Linux. Controlla i test esistenti delle scorciatoie per incollare e aggiungi test per Ctrl+V e Meta+V senza Alt, preservando le scorciatoie attuali e il comportamento di deduplicazione. Il lavoro è completato quando le nuove combinazioni incollano il testo degli appunti nel terminale integrato e i test passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Omarchy (Hyprland, Wayland) with its default "Universal paste" binding. No custom window rules for t3code.
  2. Copy some text in another app.
  3. In T3 Code Desktop, open the integrated terminal (Ctrl+J) and press Super+V (Omarchy's Cmd+V).
  4. Or press Ctrl+V directly in the terminal.
Expected behavior

The clipboard text is pasted into the terminal, with bracketed-paste encoding, as it is with Ctrl+Shift+V or Shift+Insert.

Actual behavior

Nothing is pasted. A raw ^V (0x16) goes to the PTY instead. In bash/zsh that's quoted-insert, so the next key (Enter, an arrow, Escape) is inserted literally as control bytes. Readline then loses track of the cursor: the prompt line redraws over itself, and Backspace / Ctrl+U look like they don't clear the input. Users see this as "the terminal is overwriting itself."

Why

Omarchy's universal clipboard (default/hypr/bindings/clipboard.lua) now picks the chord based on whether the focused window has the terminal tag:

o.bind("SUPER + V", "Universal paste", universal_clipboard_shortcut("CTRL", "V", "CTRL SHIFT", "V"))
  • Terminal-tagged windows get Ctrl+Shift+V.
  • Every other window gets Ctrl+V.

The t3code window isn't tagged as a terminal, and shouldn't be, because the composer and the rest of the UI need normal GUI shortcuts. So it gets Ctrl+V. But isTerminalPasteShortcut in apps/web/src/terminal/ghostty/surface.ts (same on v0.1.8 and main) only accepts Ctrl+Shift+V / Shift+Insert on Linux:

if (key !== "v") return false;
return isMacPlatform(platform) ? event.metaKey : event.ctrlKey && event.shiftKey;

Ctrl+V falls through to core.encodeKey() and is sent to the shell.

#8525 dealt with an older Omarchy scheme that mapped Super+C/V to Ctrl+Insert / Shift+Insert for tagged windows. Omarchy no longer sends those, and the untagged Ctrl+V path was never covered.

Suggested fix

On Linux/Windows, treat Ctrl+V (no Alt) as paste in the integrated terminal, as VS Code's integrated terminal does by default. Accepting Meta+V there too would cover setups that pass Super through. An opt-out setting for people who want a literal ^V would keep quoted-insert available.

Locally, changing the non-mac branch to (event.ctrlKey || event.metaKey) && !event.altKey makes both Super+V and Ctrl+V paste correctly under Omarchy. The existing pasteShortcutGesture dedupe still applies.

Impact

Major degradation or frequent failure

Version or commit

Desktop 0.1.7 (AppImage); the same code is in v0.1.8 and main

Environment

Omarchy (Arch Linux, Hyprland on Wayland), T3 Code Desktop AppImage

Workaround

Use Ctrl+Shift+V or Shift+Insert in the terminal, or add o.window("t3code", { tag = "+terminal" }) to the Hyprland config. The window rule also changes Super+C/V everywhere else in T3 (composer, editors) to the Shift variants.

Lingua principale
TypeScript
Stelle
24.8k
Fork
6.4k
Merge medio
10h 56m
PR unite (30g)
226

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pingdotgg/t3code

Tutte le issue di pingdotgg/t3code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.