Open Bug 452215 Opened 16 years ago Updated 2 years ago

Disabling the Mouse/Keyboard shortcuts to navigate forward and back


(Firefox :: Keyboard Navigation, defect)

Windows Vista





(Reporter: fergofrog, Unassigned)


(Whiteboard: [wontfix?])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/2008070208 Firefox/3.0.1

I have two additional buttons on my mouse that are MOUSE4 and MOUSE5. I use them for other applications like Ventrilo, although I can't do this because when any of the firefox windows are active and I press the button it will navigate the page back. How do I disable these binds, I want to keep using the keyboard firefox binds but not my MOUSE4 and MOUSE5 binds.

Reproducible: Always

Steps to Reproduce:
1. Press one of the buttons to speak on Ventrilo or misc. global bind function
Actual Results:  
Firefox if the active window will navigate away from this page.

Expected Results:  
Firefox should not navigate away from my page when these buttons are pressed.
Instead of adding code to prevent VK_BROWSER_BACK to have any effect (that's what your mouse driver is sending), it'd be more reasonable to teach your mouse driver to only send VK_BROWSER_BACK to selected applications. Suggesting WONTFIX.
Whiteboard: [wontfix?]
I also suffer from this.  I can't "teach" my mouse this as i used the standard windows mouse driver because the logitech driver is buggy as hell.  I've researched trying to keep Windows from sending this event to no avail.

After looking through the source code (i'm no expert), it looks like this is getting handled in nsWindow.cpp.

Probably in the nsWindow::OnKeyDown section (assuming mouse3 and mouse4 create virtual keydown keyup messages)?  If this is the case, i see no easy way differentiate between a keyboard "back" key and the left side mouse button.  Disabling the mouse back would also disable the key on an extended keyboard.

But lets be honest.. who ever uses those funky extra keys on the keyboard anyway?  I'd be very happy with an about:config way to disable this.
I do think this should be changed from a bug to a Request for enhancement though... since the behavior is as expected.  Ideally Ventrilo should provide an option to swallow the event.
The question is it easier to get Firefox, an application we use with just about every other application to change something in a configurable way, or to get every other application to make the change. 

Its windows sending VK_FORWARD and VK_BACKWARD, not the fault of the mouse driver. How an application handles any key request is up to the application, and as many have said is really that unreasonable to add single about:config option such as "mouse.disablebutton4and5navigation"? It would fix the whole issue and probably be the only browser that lets me choose that particular option. 

I'd dig into the code myself but I have way to many other coding projects to deal with an C++ isn't my strongest language.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.