In the web application I am developing, when users hit Ctrl + C, their screen selection needs to be saved in their local clipboard.
I can already detect the Ctrl + C key press, and I already have the data to be copied to the clipboard in a Javascript variable.
My question is: how to actually get the data to the clipboard when Ctrl+C is pressed? I am aware of browser limitations regarding clipboard access and of workarounds for this - I already have a Copy icon on the web page that puts the data in the clipboard, using ZeroClipboard.
I've noticed that when you select one or more cells in Google Sheets and press Ctrl + C, it actually puts the data directly in your clipboard, but I can't figure out how. Any ideas?