Back/forward functions for mouse side buttons

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

ShrapNull
Posts: 8
Joined: Sat Jan 28, 2012 4:31 pm

Re: Request - Back/forward functions for mouse side buttons

Post by ShrapNull »

I know this thread is old, but I have found a solution in a small autohotkey script I wrote. For anyone who doesn't know about autohotkey, it is very easy to use.

Create a new autohotkey script, then right click it & edit the script. Paste the following 3 lines at the bottom and save. Then double click on the file.

Code: Select all

#IfWinActive ahk_class XmainClass 
XButton1::PostMessage, 0x111, 335, 0, , XnView
XButton2::PostMessage, 0x111, 336, 0, , XnView

That is all. Please let me know if this helps you.

You can download autohotkey from http://www.autohotkey.com/download/ - the first link for autohotkey_L is fine.
Dreamer
XnThusiast
Posts: 4608
Joined: Sun Jul 25, 2004 9:08 pm

Re: Request - Back/forward functions for mouse side buttons

Post by Dreamer »

Still not working in 0.85b1.

Another workaround is HotkeyP.
Dreamer
corr
Posts: 57
Joined: Tue Jun 13, 2017 8:00 am

Re: Back/forward functions for mouse side buttons

Post by corr »

@ShrapNull:
Could it be that the class name has changed? It does not work for me and Window Spy says that the ahk_class is Qt5156QWindowIcon.

But if I change that then the PostMessage parameters seem to be wrong too. Since it still doesn't work then. I could not find the message in the list either, only if I add another zero:
https://lexikos.github.io/v2/docs/misc/ ... geList.htm

For me it currently works like this:

Code: Select all

#IfWinActive - XnView MP
XButton1::Send, !{LEFT}
XButton2::Send, !{RIGHT}
And I set Alt+Cursor for forward and backward accordingly in the XnView keyboard settings.