unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Welsh Duggan <mwd@md5i.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Why mouse-1/2/3 ?
Date: Mon, 27 Apr 2020 20:40:21 -0400	[thread overview]
Message-ID: <87wo60o32i.fsf@md5i.com> (raw)
In-Reply-To: <XnuQHvH1asls2-MY9Dd1jYYfgN-dIErvr-Pt53otDfBASslo4tvv3YCIVMbjGuYGQXuadFz9l2rLSeDlSLBjsnLDirhGBRxdhAzGSk-sOkY=@protonmail.com> (ndame@protonmail.com's message of "Sat, 25 Apr 2020 17:45:02 +0000")

ndame <ndame@protonmail.com> writes:

> I don't use the mouse in emacs at all, but when browsing info mouse-2
> caught my eye.
>
> Why emacs calls these mouse-1, 2 and 3? Wouldn't it be more user
> friendly to say left mouse button, middle mouse button and right mouse
> button?
>
> I checked what terminology Gnome uses:
>
> "Press the right mouse button on any local folder"
>
> https://help.gnome.org/users/shares-admin/stable/tool-getting-started.html.en_GB

It comes straight from X11 terminology.

1 = left
2 = middle
3 = right
4 = scroll wheel up
5 = scroll wheel down
6 = scroll wheel left (yes, really)
7 = scroll wheel right
8 = 4th button (browser back)
9 = 5th button (browser forward)

In point of fact, Emacs's first scroll-wheel support was on Windows.  I
know because I wrote it at the time.  (This was in the '96-'97
timeframe.  I didn't even have a mouse with a wheel at the time.  I had
to borrow a coworker's in order to test the code.)  At the time, I used
a new event, mouse-wheel, for the mouse-wheel event.  I don't know if
X11 supported a mouse wheel at this time.  Mainline (X11) emacs did not
need to change to support a mouse wheel once X11 had support for it: it
was just a new button number.  The symbol was just a concatenation of
"mouse-" and the button number.  Later work was done to unify NTEmacs
and mainline emacs, and the Windows-specific stuff changed to be more
like the X11 version.

One major advantage of the numbered naming system is listed above: the
code in emacs didn't need to change in the slightest when new buttons
were added.

-- 
Michael Welsh Duggan
(md5i@md5i.com)



  parent reply	other threads:[~2020-04-28  0:40 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 17:45 Why mouse-1/2/3 ? ndame
2020-04-25 18:19 ` Zach Pearson
2020-04-26  4:09   ` Po Lu
2020-04-27  9:45     ` ndame
2020-04-27  9:53       ` tomas
2020-04-27 11:10       ` Po Lu
2020-04-27 11:12         ` ndame
2020-04-27 11:46           ` Po Lu
2020-04-26  4:08 ` Po Lu
2020-04-26  6:12   ` Tim Cross
2020-04-26 16:41   ` Drew Adams
2020-04-27  9:30     ` Po Lu
2020-04-27  9:40       ` tomas
2020-04-27  9:47         ` Pip Cet
2020-04-27 15:13           ` Stefan Monnier
2020-04-28  0:40 ` Michael Welsh Duggan [this message]
2020-04-28 15:27   ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2020-04-27 10:37 ndame
2020-04-27 10:40 ` tomas
2020-04-27 12:32   ` Ulrich Mueller
2020-04-28  2:47     ` Richard Stallman
2020-04-27 10:41 ` Andreas Schwab
2020-04-27 10:47   ` ndame
2020-04-27 11:02     ` tomas
2020-04-27 10:53   ` ndame
2020-04-27 11:11 ` Po Lu
2020-04-27 13:29   ` Clément Pit-Claudel
2020-04-27 13:14 ` Dmitry Gutov
2020-04-27 13:27   ` ndame
2020-04-27 15:08     ` Dmitry Gutov
2020-04-27 10:50 ndame
2020-04-27 11:23 ndame
2020-04-27 11:31 ` tomas
2020-04-27 13:36   ` Clément Pit-Claudel
2020-04-27 13:39     ` Dmitry Gutov
2020-04-27 14:08     ` tomas
2020-04-27 14:26       ` Clément Pit-Claudel
2020-04-27 14:50         ` tomas
2020-04-27 16:00     ` Drew Adams
2020-04-27 19:04       ` chad
2020-04-28  2:51         ` Richard Stallman
2020-04-28  3:48           ` Tim Cross
2020-04-27 16:01     ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo60o32i.fsf@md5i.com \
    --to=mwd@md5i.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).