As mentioned by flachbar, the clipboard is accessible from Java: My dynamic menus have both copy and paste capabilities, and in the default STV, there is some code to copy the placeshifter locator ID to the clipboard.
Code:
"REM copy string "text" to windows clipboard"
+- Clipboard =java_awt_Toolkit_getSystemClipboard(java_awt_Toolkit_getDefaultToolkit())
+- LocIDTransfer =new_java_awt_datatransfer_StringSelection(text)
+- java_awt_datatransfer_Clipboard_setContents(Clipboard, LocIDTransfer, LocIDTransfer)
for getting strings from clipboard in pure STV code, its a little more complicated, so I added it as an exported STV.
Alternatively you can use my sageUtils pagage:
Code:
text=net_sf_sageplugins_sageutils_GetClipboard_GetString()
As for handling CTRL-C and CTRL-V as keyboard shortcuts, you can get the events with the RawKeyboard listener