Ignoring Mouse4/5

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
djsb-

Ignoring Mouse4/5

Unread post by djsb- » 2012-05-12, 01:55

Hi, is there any chance that we could see an option to ignore mouse buttons 4 and 5 (XBUTTON1, XBUTTON2) in Pale Moon? Most browsers, FF and Pale Moon included, use them as shortcuts for Forward and Back, but I use them exclusively as my "Push to talk" buttons in voice chat programs and it gets a bit frustrating when the browser responds to them too.

The only reason I'm making a feature request is because I've researched the problem pretty thoroughly and have come to the conclusion that addressing it in the browser itself is the only solution.

Thanks.

lyceus

Re: Ignoring Mouse4/5

Unread post by lyceus » 2012-05-12, 05:01

djsb- wrote:Hi, is there any chance that we could see an option to ignore mouse buttons 4 and 5 (XBUTTON1, XBUTTON2) in Pale Moon? Most browsers, FF and Pale Moon included, use them as shortcuts for Forward and Back, but I use them exclusively as my "Push to talk" buttons in voice chat programs and it gets a bit frustrating when the browser responds to them too.

The only reason I'm making a feature request is because I've researched the problem pretty thoroughly and have come to the conclusion that addressing it in the browser itself is the only solution.

Thanks.
Interesting note, really few people apart gamers need more buttons in their mouses. It would help if you left the specs of your mice as well: Model/brand of mice, Windows OS you have. If more people are interesting on this trouble maybe it can be a ToDo for future versions.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35648
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Ignoring Mouse4/5

Unread post by Moonchild » 2012-05-12, 10:09

You can probably set this up in the driver or control app that comes with your mouse, though, regardless of what you found. For example, tying actions to touchpad gestures and controls is also not done in the browser but in the touchpad application.

It is very vendor-specific, and I'm quite sure all Pale Moon does is respond to a command specifically that has been given to it. It goes back when it receives the command "go back", it very likely won't receive the command "the user just pressed mouse button 4 on their gaming mouse of such and such brand". If the control application doesn't let you configure the mouse commands (you may possibly have to hack a configuration file by hand) then it's fairly hard to solve.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

djsb-

Re: Ignoring Mouse4/5

Unread post by djsb- » 2012-05-14, 00:51

Actually the mouse4 and mouse5 buttons aren't enabled with custom drivers like tablet gestures, they work perfectly fine. Windows and most programs recognize them as their own inputs, and consider them to be "forward" and "backward" buttons. To my knowledge there's no way to make mouse4 and mouse5 not natively act as forward and backward because that's just what they do in Windows (even the Explorer shell can be navigated with mouse4 and 5). Unless the program just doesn't respond to those inputs (such as games or voice communications which don't have a forward/backward context to begin with), hence my request.

edit:
I'm using Win7 Pro x64 with a Razer Copperhead. Its drivers are currently setting its polling rate, and not touching anything at all to do with button functions. I could uninstall them, restart, and the side buttons would work just as before.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35648
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Ignoring Mouse4/5

Unread post by Moonchild » 2012-05-14, 07:15

If this is hard-coded in Win7 with no option to control it (which it looks like), there's very little to be done about it. Windows will send a "navigate back" or "navigate forward" command to the browser, and the browser should respond appropriately. Disabling that would disable it altogether in the browser which is not a good thing; it will not be able to determine what triggered the command, and it can be triggered multiple ways.

STILL: the tools that come with your mouse (Logitech's "set point" does as far as I know) usually allow you to map the buttons to specific commands or macros on a per-application basis. You can map the buttons to a shortcut or that does nothing in Pale Moon, e.g. Alt-F2

What you can do if Razor is seriously lacking in per-application configuration support is grab a tool that lets you configure per-application settings for what to do with mouse events.
A quick Google search found me this: http://www.highrez.co.uk/downloads/XMou ... ontrol.htm
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

djsb-

Re: Ignoring Mouse4/5

Unread post by djsb- » 2012-05-14, 16:28

I won't belabor the point if you're not interested in adding an about:config toggle, but rebinding the mouse buttons to an arcane key combination while the browser is active (like with AutoHotKey) would indeed prevent the browser from navigating forward and back, but then the VoIP programs I use would not recognize it as my "push to talk" buttons, which is the only reason I use mouse4 and mouse5 to begin with. The browser just needs to play dumb and nothing else.

Do you think this is the sort of thing that a Firefox extension could handle, or does it appear to be locked down?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35648
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Ignoring Mouse4/5

Unread post by Moonchild » 2012-05-14, 17:04

about:config isn't a magic wand that can just be waved to make the browser suddenly do exactly what you want :)
As stated before: the browser responds to a command it's given, and it doesn't know if it was a mouse event, keyboard even or other event causing this command to be given, as that lies outside the application's scope.

Like I said, you need to set your mouse software up per application to perform different actions depending on which application is active. That way your VoIP software will get your "push to talk" command when it's active, and the browser can simply be set to ignore it. You won't block global mouse events that way.

Have you even tried XMouse Button Control? People have had great success with Firefox and Ventrilo with it:
http://support.mozilla.org/en-US/questions/685435
All I had to do was make a Window Profile for FireFox and tell it to disable button 4/5 signals to it. My TeamSpeak running in the background still picks up on button 4.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite