[Gambas-user] middle mouse paste
bsteers4 at gmail.com
Tue Dec 27 18:13:17 CET 2022
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
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
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
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
(and a toggle for it in the IDE editor prefs)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User