LyXMousewheel / Middle button click, can it be disabled?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
NickThissen
Posts: 2
Joined: Tue Jul 06, 2010 11:49 am

Mousewheel / Middle button click, can it be disabled?

Post by NickThissen »

Hey,

I'm using LyX 1.6.5 on Windows XP, and recently I've noticed that clicking the mouse wheel (or probably the middle mouse button if you have one) will paste the previously selected text into the document where the cursor is at that point.

Can I disable this feature? I cannot find it in the options anywhere... I find it very annoying. When I'm scrolling large distances I might accidentally click the wheel, in which case I would paste possibly huge amounts of text at random positions... Especially when scrolling, something like that can be hard to notice. I just found out my introduction was completely scrambled (it looked like a secret message almost lol) because of this and I basically had to write it again, there was no saving it.

I'm seriously considering switching editors just because of this. I don't want to finish my report and then find out half my text is in the wrong place...

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Mousewheel / Middle button click, can it be disabled?

Post by frabjous »

This might be a feature of your operating system rather than LyX. For example, on most flavors of linux (those using graphical configurations based on xorg), clicking the mouse wheel always pastes.

Here's some instructions from Ubuntu's wiki for turning it off or changing the behavior.

Personally, I like it however.

If you're on another operating system, I've no clue.
NickThissen
Posts: 2
Joined: Tue Jul 06, 2010 11:49 am

Re: Mousewheel / Middle button click, can it be disabled?

Post by NickThissen »

I've already stated in the very first sentence that I am using Windows XP. Middle-mouse click paste is not default OS behavior, I am sure it is a LyX feature.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Mousewheel / Middle button click, can it be disabled?

Post by meho_r »

I agree, LyX on Windows is the one who enables this feature, nothing to do with the OS. You may try asking on LyX forum.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Mousewheel / Middle button click, can it be disabled?

Post by frabjous »

Sorry I guess I read your first post too quickly.

It’s been awhile since I used Windows, but if there’s there no way of preventing it from inside LyX, you could almost certainly intercept middle mouse wheel clicks with AutoHotKey, or even program them to do something else instead. AutoHotKey is probably the thing I miss most about Windows. (OK, the only thing I miss about Windows!)
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Mousewheel / Middle button click, can it be disabled?

Post by meho_r »

@frabjous, you're using Ubuntu, right? Maybe not the same, but this seems like a cool little app.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Mousewheel / Middle button click, can it be disabled?

Post by frabjous »

Yeah, I do use AutoKey, but it’s nowhere near as nice as AutoHotKey. (Either that, or I just haven't mastered it yet.)

(I recently switched from Ubuntu to ArchLinux, but, yeah, more or less the same stuff is available.)
amontigit
Posts: 1
Joined: Sun Oct 14, 2012 12:53 am

Mousewheel / Middle button click, can it be disabled?

Post by amontigit »

I succeded to disable middle button click with autohotkey. It was really annoying on my windows-7. Have it working is a little tricky. You need to create the following script (save to "filename.ahk")

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 1
#IfWinActive, LyX:
MButton::
MsgBox, Catch qwidget mouse click
return
#IfWinActive ; To turn off context sensitivity

then you compile it (select script and right click with mouse), and run the executable as Administrator. That's all.

If you want you can remove the Msgbox line:

SetTitleMatchMode, 1
#IfWinActive, LyX:
MButton::
return
#IfWinActive ;
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Mousewheel / Middle button click, can it be disabled?

Post by scottkosty »

As of LyX 2.2 there will be a preference to control middle button click behavior. Middle click is disabled by default for Mac and Windows users.

The fix was by Jürgen Spitzmüller and can be seen here:
http://www.lyx.org/trac/changeset/d48e5330/lyxgit
Post Reply