Detect copy text to clipboard

Detect copy text to clipboard

Hi guys

I am looking for a snippet of code to trigger an event when the user selects and copies piece of text to the clipboard (either by pressing ctrl-c or right click/copy). The event would trigger at this moment with the contents of the selected text.

Is it possible?