The Clipboard History feature lets you view and paste items you previously copied. It is especially useful for developers who frequently switch between code snippets, URLs, and file paths.
Enabling Clipboard History
Open Settings โ System โ Clipboard and turn on Clipboard history. You can also enable it via PowerShell:
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Clipboard" -Name "EnableClipboardHistory" -Value 1
Keyboard Shortcut
Press Win + V to open the Clipboard UI. From there you can:
- Pin items to keep them permanent.
- Delete individual entries.
- Search the history.
Programmatic Access (C#)
Starting with Windows 10 version 1809 you can access the clipboard history via the Windows.ApplicationModel.DataTransfer namespace. Example:
using Windows.ApplicationModel.DataTransfer;
public async Task<List<string>> GetClipboardHistoryAsync()
{
var history = await Clipboard.GetHistoryItemsAsync();
return history.Select(item => item.Content?.GetTextAsync().GetAwaiter().GetResult() ?? string.Empty).ToList();
}
Common Issues
If the clipboard history is not persisting across reboots, make sure you have Sync across devices enabled and that your Microsoft account is signed in.
Comments