[FEATURE] Mark Clipboard Paste temporary writes with org.nspasteboard.TransientType so clipboard managers ignore dictations #652
mkallistos
started this conversation in
Ideas
Replies: 1 comment
-
|
Is this mainly for clipboard paste route ? For some people the clipboard text is actually a fallback, i.e. if insertion fails the text is still available somewhere. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
When the insertion mode is set to Clipboard Paste (
reliablePaste) — the recommended workaround for apps where Clipboard Free Insert doesn't land (e.g. webview/terminal wrappers, related: #479) — every dictation is written toNSPasteboard.generalas a plain string item with no metadata.For anyone running a clipboard history manager (Maccy, Raycast Clipboard History, Paste, CopyClip, …) this has two side effects:
restorePasteboardSnapshotre-writes the previous clipboard contents, which bumpschangeCountagain, so polling managers record the user's prior clip a second time and reorder history.Per-app ignore lists in clipboard managers can't filter this out: managers attribute a pasteboard change to the frontmost app, which during dictation is the target app being typed into, not FluidVoice.
Proposed solution
Adopt the community pasteboard convention from http://nspasteboard.org: when
withTemporaryPasteboardString(inSources/Fluid/Services/TypingService.swift) writes the temporary paste payload, declareorg.nspasteboard.TransientType(and arguablyorg.nspasteboard.AutoGeneratedType) on the same pasteboard item:Well-behaved clipboard managers ignore items marked transient by default (Maccy, Raycast, Paste, Alfred all honor this), so dictations would stop polluting clipboard history while paste behaviour is completely unchanged for the target app.
Marking the restore write as transient too would fix side effect 2, since it re-writes content the manager has already recorded.
Alternatives considered
Environment: FluidVoice 1.6.4 (Homebrew cask), macOS 26.5 (Tahoe)
Beta Was this translation helpful? Give feedback.
All reactions