A lightweight AutoHotkey v2 script that provides visual feedback (Tooltip) when you copy text using the Ctrl+C shortcut.
Key Features:
- v2 Syntax: Fully compatible with AutoHotkey v2.0+.
- User-Centric: Specifically checks for the Ctrl key state so it doesn't trigger when background apps change your clipboard.
- Non-Intrusive: Uses a temporary ToolTip that follows the mouse and disappears automatically.
- Install AutoHotkey v2.
- Create a new
.ahkfile and paste the code. - Run the script.
- Highlight any text and press Ctrl + C.
#Requires AutoHotkey v2.0
; Register the function to monitor clipboard changes
OnClipboardChange(NotifyOnCopy)
NotifyOnCopy(DataType) {
; Check if Ctrl is held down to ensure it's a manual copy action
if GetKeyState("Ctrl") {
if (DataType = 1) {
; Handle Text: Show a preview of the content
ClipPreview := SubStr(A_Clipboard, 1, 50)
Msg := "📋 Copied: " . ClipPreview . (StrLen(A_Clipboard) > 50 ? "..." : "")
ShowNotification(Msg)
}
else if (DataType = 2) {
; Handle Images/Files: Simple notification
ShowNotification("🖼️ Non-Text Content Copied")
}
}
}
ShowNotification(Text) {
ToolTip(Text)
; Clear the tooltip after 1.5 seconds
SetTimer () => ToolTip(), -1500
}Keywords: AutoHotkey, AHK v2, Clipboard Monitor, Ctrl+C Notification, Tooltip, Script, Productivity.
This content is prompted by me and generated by Google Gemini.