[Gambas-user] middle mouse paste
benoit.minisini at gambas-basic.org
Tue Dec 27 18:28:34 CET 2022
Le 27/12/2022 à 18:13, Bruce Steers a écrit :
> Having problems with gambas doing middle mouse click pasting text !
> It's really annoying as my mouse is a bit rubbish and i keep
> accidentally pasting text as i'm scrolling with the wheel and messed
> some code up a few times.
> I disabled the feature on my mate desktop settings and now it does not
> happen on things like pluma or mate terminal but it's still happening in
> the IDE.
> Okay i just checked the code and it seems yes ,
> TextEditor.class / View_MouseUp() pastes text if middle mouse.
> I added a fix in my scripted editor I override the View_MouseUp() method
> like this..
> Public Sub View_MouseUp()
> If Mouse.Middle And If Not Me.ReadOnly And If Not $bMiddleMousePaste Then
> Me.ReadOnly = True
> Me.ReadOnly = False
> So if middle mouse is clicked and doc is not readonly and my
> MiddleMousePaste property is false it sets readonly property to true
> then fires the super mouseup event then sets readonly to false again.
> That seemed the best way to override in an automatically inherited
> TextEditor.class in my own application but it would be great if we could
> get a simple property like that for TextEditor.class Ben, to disable
> middle mouse paste.
> (and a toggle for it in the IDE editor prefs)
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
It should be a global desktop configuration...
More information about the User