The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

How to disable middle click action (jump to google) outside a text box?

Forums » Opera for Windows/Mac/Linux » Opera for *nix - Linux/FreeBSD

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

23. November 2011, 13:28:07

drdano

Posts: 21

How to disable middle click action (jump to google) outside a text box?

I use the middle click to paste feature a lot and it's very useful. But if I slightly miss a text box Opera jumps to Google and searches for whatever is in the paste buffer. As well as being an annoying feature (I've never found I need to search for something that quickly) it's a considerable security and privacy issue. I know there is a preference to switch this action to panning rather than searching but, frankly, that is even more annoying.

Is there a way to disable this but still keep the paste to text box functionality?

Perhaps the preferences at "Settings > Preferences > Advanced > Shortcuts > Middle-Click Options" should have an extra option of "Paste but do nothing in empty space" for middle click action? Can this be added to the requested features list?

Thanks.

25. November 2011, 09:00:23

Moderator

sgunhouse

Volunteer

Posts: 66788

Opera will always paste when middle-clicking in a text box. If you switch to "Start panning" then it will no longer do the "paste and go" action when clicking elsewhere on a page (it'll start scrolling instead, like Opera for Windows does), but it'll still paste in text fields.

25. November 2011, 16:26:20

drdano

Posts: 21

Thanks for the reply.

Originally posted by sgunhouse:

Opera will always paste when middle-clicking in a text box. If you switch to "Start panning" then it will no longer do the "paste and go" action when clicking elsewhere on a page (it'll start scrolling instead, like Opera for Windows does), but it'll still paste in text fields.



I know about this and have tried it for a while but it's just as annoying when accidentally clicking slightly outside of a box and has me swearing at the computer and Opera! I've since read that many other people have asked for the exact same thing. Is there some reason for the resistance? I'm at a loss to understand why such actions are just a single click away especially on the scrollwheel where it's easy to mis-click while scrolling.

If the paste-or-do-nothing option is not viable could it be possible to have these other actions on a modifier key? Ctrl-middle click is zoom reset (usefulish and related to the Ctrl-scrollwheel use). Alt-middle click is handled by KDE to raise and lower windows. I tried Shift-middle click and, as if to taunt me, Opera brings up the very menu I'm talking about! In what universe do I need that kind of access to a menu?! So, that leaves Shift-middle click doing nothing useful and can be deployed safely for the jump-to-google/panning function.

Anyone see any problems with this?

Thanks.

26. November 2011, 08:32:58

Moderator

sgunhouse

Volunteer

Posts: 66788

Well, you could always try assigning your own action to it... Make it something suitably meaningless, such as Zoom to, 100 (which is to say, what Ctrl-middleclick currently does).

You can refer to middleclick in the mouse setup file as "Button3", as long as your action can be performed (even if it has no visible effect) then it should prevent the other action from occuring - hence my suggestion about using Zoom to, 100. You might have to work to enable middle-click paste in a text area then, but otherwise it should work ...

26. November 2011, 11:14:56

drdano

Posts: 21

Originally posted by sgunhouse:

Well, you could always try assigning your own action to it... Make it something suitably meaningless, such as Zoom to, 100 (which is to say, what Ctrl-middleclick currently does).

You can refer to middleclick in the mouse setup file as "Button3", as long as your action can be performed (even if it has no visible effect) then it should prevent the other action from occuring - hence my suggestion about using Zoom to, 100.


I experimented as you suggested. I now have Shift-middleclick doing something useful as Zoom to, 150. I tried the middle click on its own and as you say the paste no longer works which makes the whole thing moot as it's the paste I want but not the other actions.

It's a step in the right direction but not the full solution. Unless these actions can be controlled in a configuration file then I feel it is up to Opera to add this as an option to the mouse config menu?

You might have to work to enable middle-click paste in a text area then, but otherwise it should work ...


Ok, spill the beans. How would I get middle-click paste working again?

26. November 2011, 18:12:28

Moderator

sgunhouse

Volunteer

Posts: 66788

In the Edit dialog, click on Advanced, then on "Edit widget". Set Button3 to be "Paste mouse selection". Not 100% certain, but it should work.

26. November 2011, 20:37:10

drdano

Posts: 21

Originally posted by sgunhouse:

In the Edit dialog, click on Advanced, then on "Edit widget". Set Button3 to be "Paste mouse selection". Not 100% certain, but it should work.


Doh. Now why didn't I think of that.

Ok, tried it. An interesting feature. If only life were that simple... I tried Paste mouse selection and it did paste-and-go. I tried Paste and it did paste-and-go. I tried Paste mouse selection and go background and it did paste-and-go. I think I see a pattern emerging here. i tried all seven of the Paste something actions Opera has, even the Paste to note. Every single one of the did paste to a text box and goto Google outside the text box. When I configured the middle click action to panning it would then pan rather than goto Google.

I can see that this should work but for some unfathomable reason it doesn't.

Should I report this as a bug?

27. November 2011, 08:44:26

Moderator

sgunhouse

Volunteer

Posts: 66788

Where did you put it? In the Edit widget context it shouldn't ...

The biggest problem is whether it would paste where you clicked, or where you previously had focus.

28. November 2011, 02:22:25

drdano

Posts: 21

Oops. Distracted by the various paste actions I put it in the wrong place with other buttons.

I've now set "Button3 Zoom point" in Browser Window and "Button3 Paste mouse selection" in Advanced > Edit Widget.

You're right. It pastes where the cursor is and not where I middle click. Close, but no cigar.

Out of curiosity, I deleted the Edit Widget action and modified the Browser Window one to:
Button3   Paste mouse selection | Zoom point

It appears to exhibit the exact same behaviour.

(I'm already missing having a coherent middle-click paste just typing this!)

So what is needed is an action something along the lines of "Move cursor to mouse pointer and paste mouse selection" or an extra option on the middle-click options menu...

Any other ideas still left to try?

28. November 2011, 06:25:11

Moderator

sgunhouse

Volunteer

Posts: 66788

Hmm ... looking at the list, all I'd suggest was seeing if Activate element would work. Doubtful, but never hurts to try.

28. November 2011, 14:47:55

drdano

Posts: 21

Tried "Activate element & Paste mouse selection" and it's the same as before. Pastes where the cursor is rather than where the mouse pointer position. Looking through various config lists I see Opera has almost every conceivable options except what I want...

I decided to have another stab at the config files and went through opera:config with a fine-toothed comb. I found this option under opera:config > User Prefs > Extended Center Mousebutton Action. The opera:config documentation describes this as "Paste and go. UNIX only. 0 = start panning." Now, I'm assuming what it means is 0=pan and !0=paste-and-go but there's the possibility that the code actually tests for 1=paste-and-go. To test this I set this value to 2. I deleted all the Button3 references in Mouse setup and retested middle-click pasting.

Well, you could slap me around the head with a slice of lemon. Opera would appear to be doing just that. No more paste-n-go. No more panning. No action if clicking outside a text box. Pasting working beautifully again. The air is fresh and fragrant. The birds are tweeting. The world has a warmer, welcoming glow again. Exactly the middle-click behaviour as I was after!!

While I understand this is exploiting an undocumented feature it would be nice if it were an official way to resolve this problem. It is more or less what I asked for in my first post, just without the UI.

sgunhouse, thanks again for your help.

13. January 2012, 02:03:33

gcbopera

Posts: 4

Thank you!

opera:config > User Prefs > Extended Center Mousebutton Action = 3
solved it!

this is the first thing i disable in firefox, and in opera it's even worse (firefox just annoy you if it's not a url, opera goes to google...)

13. January 2012, 02:05:19

gcbopera

Posts: 4

also, middleclick in codeacademy does not work in opera. you have to use ctrl+v

19. January 2012, 16:29:07

Reijer

Posts: 8

Thank you. I needed this. I can't imagine anyone thinks paste and go is useful. Obviously someone does, I just can't imagine it.

19. January 2012, 22:29:40

furue

Posts: 178

Originally posted by Reijer:

I can't imagine anyone thinks paste and go is useful. Obviously someone does, I just can't imagine it.

Wow, I've just discovered this feature thanks to this thread! smile I've just tried it for a few times and I love it so far. I'll keep using it for a while. If I come to dislike it, I may come back to this thread and post a report.

To me, anything that saves extra steps (even one step) is addictive. Of course, I'm not posting this to annoy you. smile I don't even intend to show a counter example. I'm just amused that I discovered a feature thanks to a thread by people who hate it.

Cheers,
Ryo

Forums » Opera for Windows/Mac/Linux » Opera for *nix - Linux/FreeBSD