BetterWinTab includes a built-in clipboard history panel accessible from the overlay. Every text entry you copy anywhere on your desktop is captured automatically, so you can retrieve anything you copied in the current session without switching to the source application. The panel is keyboard-navigable — move through entries with the arrow keys and pressDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sgm1018/BetterWinTab/llms.txt
Use this file to discover all available pages before exploring further.
Enter or click to put an item back on the clipboard.
Accessing Clipboard History
The clipboard history lives in the special Clipboard folder (FolderType.Clipboard), pinned in the sidebar. To open it:
- Press
Ctrl+Tabto open the overlay. - Press
Tab/Shift+Tabto navigate the sidebar until the Clipboard entry is highlighted, or click it directly. - The window grid is replaced by the clipboard history panel showing recent entries, newest first.
- Use
Arrow Up/Arrow Downto navigate between items. - Press
Enteror click an item to copy it to the clipboard (a “Copied!” toast appears briefly to confirm).
What Is Tracked
v1 behavior — text only. BetterWinTab captures all text clipboard entries. Images are detected and tracked with a placeholder entry showing
[Image], but the image data itself is not stored persistently — only a BitmapImage preview is loaded asynchronously for display. Images cannot be re-pasted from the history panel in v1.ClipboardItem:
| Property | Type | Description |
|---|---|---|
Id | string | Unique GUID string for the entry |
Text | string? | The captured text content |
IsImage | bool | true for image clipboard events |
ImageSource | BitmapImage? | Asynchronously loaded bitmap preview (image entries only) |
CapturedAt | DateTime | Timestamp of when the entry was captured |
Preview | string | Truncated to 120 chars with ... suffix; falls back to "[Image]" for images |
SingleLinePreview | string | \r\n, \n, and \r replaced with spaces, truncated to 80 chars |
TimeAgo | string | Human-readable age: "just now", "5m ago", "2h ago", or a date string |
SizeInfo | string | Character count for text (e.g. "42 chars"); "Image" for image entries |
IsPinned | bool | Whether the item is pinned to survive app restarts |
History Settings
| Setting | Default | Description |
|---|---|---|
ClipboardHistoryEnabled | true | Master toggle. When disabled, the Clipboard folder is removed from the sidebar and no new entries are captured. |
ClipboardHistoryMaxItems | 50 | Maximum number of entries to retain. Older items are trimmed from the bottom of the list when the limit is reached. |
Pinned Clipboard Items
Pinning an item marks it withIsPinned = true and adds its Text to AppSettings.PinnedClipboardItems (a List<string>) which is persisted to disk. On the next launch, BetterWinTab restores pinned items into the ClipboardService.History collection before regular session entries.
Pinned items are never trimmed by the ClipboardHistoryMaxItems limit.
How ClipboardService Works
ClipboardService monitors the clipboard using the Win32 AddClipboardFormatListener API, which registers a window handle to receive WM_CLIPBOARDUPDATE messages whenever any application changes the clipboard content.
WM_CLIPBOARDUPDATE message arrives:
ClipboardService.ProcessMessage(msg)checks the message code and, if_selfCopyingis not set, callsCaptureClipboard().CaptureClipboard()first callsIsClipboardFormatAvailableto determine the content type:- Text (
CF_UNICODETEXT): opens the clipboard withOpenClipboard(IntPtr.Zero), reads the Unicode text viaGetClipboardData, then closes the clipboard. - Image (
CF_BITMAPorCF_DIB): does not open the clipboard directly — instead creates a placeholderClipboardItemwithIsImage = trueimmediately, then enqueues an async task to load the actual bitmap via the WinRTClipboard.GetContent()API on the UI thread.
- Text (
- For text: a new
ClipboardItemis created and inserted at index 0 of theHistoryobservable collection, or the existing duplicate entry is moved to the top. - For images: a placeholder
ClipboardItemwithIsImage = trueis inserted at index 0, andBitmapImagepreview loading is dispatched to the UI thread. TrimHistory()removes the oldest items if the count exceedsClipboardHistoryMaxItems.
Self-Copy Prevention
When you select a history entry and pressEnter, BetterWinTab calls ClipboardService.CopyToClipboard(item), which writes the text back to the clipboard via Win32. To prevent this programmatic write from creating a duplicate history entry, the service sets an internal _selfCopying flag before calling OpenClipboard. Any WM_CLIPBOARDUPDATE message received while _selfCopying is true is silently ignored. The flag is reset asynchronously via the DispatcherQueue after the clipboard write completes, ensuring that any WM_CLIPBOARDUPDATE message already queued by the message pump is also suppressed.
Image Debouncing
Some applications fire multipleWM_CLIPBOARDUPDATE messages for a single image copy. ClipboardService debounces image captures with a 500 ms minimum interval between image entries, discarding rapid duplicates.
Stopping the Listener
ClipboardService implements IDisposable. Calling Dispose() — or explicitly calling Stop() — unregisters the HWND via RemoveClipboardFormatListener. The service is automatically disposed when the BetterWinTab overlay window is closed.