You can use other approach: Show popup textbox with the text you want
user to be able to copy. Also, you can automatically make text
selection and point focus to the textbox.
So the only thing for user left to do is to press Ctrl+C, or use
context menu to put the text to Clipboard.
This approach used in our application (
http://www.projectkaiser.com:8080/pk
), you can take a look by pressing "Permanent link" button at the top-
left corner of any tab.