copy with the middle mouse

Forum thread started by czeidler on Wed, 2005-12-14 13:01

Hi,

maybe someone know this from linux: You mark a text with the mouse in a arbitrary application , then the text is copied to the clipboard and could be insert with the middle mouse.
How can I realize this on BeOS? My Problem is to know the last marked text.

thanks

Comments

copy with the middle mouse

Hi,

Well personally this auto-copy feature is more bothering than useful to me, BeOS have the ability to clipping text, image.. select it then drag n drop the selection into the application or on the desktop.
In your case, i would simply copy/paste the text :wink:

copy with the middle mouse

normal copy and past is ca ten-thousand time slower than the linux way ;-) And the main thing: it is more pleasant! (sure there are exceptions) but that was not my question every one should work in the way he like to work!
So is there a way to get the last marked text?
thanks

copy with the middle mouse

You can use UniversalScroller http://www.bebits.com/app/1359. Use the 'Clicks' tab in Preferences.

copy with the middle mouse

hm this tools only copy the clipboard to the mouse pointer but not copy the marked text to the clipbord.

Is it possible to filter the mouse events and try find out when a text ist marked?

copy with the middle mouse

I don't know, but what you want is probably very Linux-specific...

copy with the middle mouse

If you need a clipboardmanager try this one http://www.bebits.com/app/2514

copy with the middle mouse

Hey nobody an idea how I can get the marked text? Maybe i can write a input server plugin and check when the mouse button is hold. But how could I then know that a text is marking?

copy with the middle mouse

ZzLeCzZ wrote:
Hey nobody an idea how I can get the marked text? Maybe i can write a input server plugin and check when the mouse button is hold. But how could I then know that a text is marking?

An idea would be to make an input server filter addon which filters events with middle button pushed and sends a scripted message to the active window/view with a B_COPY command. This might depend on the scriptability of the current application though.

copy with the middle mouse

thats not my problem , My problem is sill that ich don't know what to copy, means during I mark a text the text must be copying to the clipboard...

copy with the middle mouse

ZzLeCzZ wrote:
thats not my problem , My problem is sill that ich don't know what to copy, means during I mark a text the text must be copying to the clipboard...

You don't get it. The application will copy the text to clipboard if you ask it to do it.

copy with the middle mouse

and how can I ask the application to do so?

copy with the middle mouse

ZzLeCzZ wrote:
and how can I ask the application to do so?

by listening to Korli above,

Korli wrote:
... nd sends a scripted message to the active window/view with a B_COPY command. This might depend on the scriptability of the current application though.

copy with the middle mouse

oh yes sorry I misunderstood it...

Now I try to send a B_COPY message to the active app when MOUSE_UP...
But I have a problem to put it into practice. Here my code that called when the mouse is up:

app_info appinfo; 
BRoster roster; 
roster.GetActiveAppInfo( &appinfo ); 
status_t error; 
    
BMessenger *msgr=new BMessenger(appinfo.signature, appinfo.team ,&error); 

BMessage msg(B_COPY); 
          
msgr->SendMessage(&msg, (BHandler *)0,HUGE_TIMEOUT);

But when I click in an application window, mark something and release the mouse the markt text isn't in the clipboard :-(