SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-26-2006, 09:31 PM
nathanm nathanm is offline
Sage User
 
Join Date: Aug 2004
Posts: 39
Send a message via AIM to nathanm
Text input widget, copy from clipboard

Is there any way to allow the text input widget to accept CTRL-C copying text from the clipboard?
Reply With Quote
  #2  
Old 10-27-2006, 04:22 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by nathanm
Is there any way to allow the text input widget to accept CTRL-C copying text from the clipboard?
Nope, the standard Sage text widget does not support this. I needed something like this in SageMC and had to write my own text widget for pasting from the clipboard with ctlr-v (requires java coding though)

Dirk
Reply With Quote
  #3  
Old 10-27-2006, 05:47 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
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
Attached Files
File Type: zip Paste.zip (1.5 KB, 237 views)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.