Closed Bug 18251 Opened 25 years ago Closed 25 years ago

[FEATURE] Customizable commands on middle mouse click

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P3)

enhancement

Tracking

()

VERIFIED FIXED

People

(Reporter: pete, Assigned: joki)

Details

(Whiteboard: [HELP WANTED])

It would be nice if I could customize the middle click to do whatever I want it
to,(Back, Forward, History, go to URL, etc) and do different commands in
different situations.

Example:  I choose middle click to go Back normally, but opens a link in a new
window when the mouse is over a link.

I should also be able to do this in Messenger and Composer, but with commands
specific to them.

here's the original request from n.p.m.wishlist
------------------------
Hi All,

I was browsing the threads around here, and I saw a thread about making the
middle button open a link into a new window.  I think this is a great idea, but
in thinking about it I came up with the following idea that would make it even
better.

What if you could customize the middle mouse button to do user specified
commands?  For example, it would be nice if I could customize the middle button
to execute Back, Forward, History, write a new email, etc.

That is just the beginning though. I also wish that I could customize it to do
different actions in different contexts.  Say if normally the middle button is
set to execute Back, if the mouse is over a link, it should open a new window
(or copy the URL, or Edit in Composer, or whatever I choose).  When I am not
over the link, it would just execute Back.

It would also be really cool if I could do this in messenger, too.  For example,
when I read newsgroups, I usually hit the next unread message button to go to
the next message.  It would be cool if I could customize the middle click to do
that.

There are probably some cross-platform concerns with this though (i.e. The mac's
1 button mouse), and it may be better suited for advanced users than grandma.
(I'm not sure if there is going to be normal/advanced modes in mozilla?)
Component: Browser-General → Event Handling
QA Contact: leger → janc
Target Milestone: M15
Setting QA Contact and component
Whiteboard: [HELP WANTED]
Yes, it would be great if mouse events were customizable through a mechanism
like the one currently used for XUL key bindings.
Assignee: leger → joki
Assigning to appropriate engineer.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Actually, it turns out that you can do this already.  I added "go to url in
clipboard" by adding code in navigator.xul and navigator.js, and didn't have to
touch any C++ code in order for it to work.  That means you could presumably
make it do back, etc. by writing the appropriate JS code.  Cool -- I didn't know
this was possible until alecf suggested that I try it.

One issue to be wary of: there's a bug on event handling, where JS events and
C++ dom event handlers sometimes both get called (the event doesn't get
cancelled) because things are happening in the wrong order: see bug 23669.
QA: Jan, I can show you the middle mouse go-to-clipboard-url working in the
browser window, or you can try it (preferably on linux, not all windows boxes
actually generate middle-mouse events), or you can just take my word for it. :-)
Keywords: verifyme
Mass update:  changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Updating QA Contact.
QA Contact: ckritzer → lorca
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
QA contact updated
QA Contact: gerardok → madhur
verified on build 2001-08-06-trunk
Status: RESOLVED → VERIFIED
wait why is this bug marked FIXED?
Well, you can customize them by expanding the jar files and changing the JS
code.  If you want a nice API or UI for end users, that would be a different
matter (actually two different matters, one for the API and one for the UI; both
would certainly be future/helpwanted, and would be a lot of work, but if someone
wanted to work on it and wants help, let me know since I'd be glad to offer
pointers/suggestions).
well can we leave the bug open until this happens?
Keywords: verifyme
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.