From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: Why mouse-1/2/3 ? Date: Mon, 27 Apr 2020 20:40:21 -0400 Message-ID: <87wo60o32i.fsf@md5i.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="55000"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 28 02:41:49 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTEJp-000EDW-EQ for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Apr 2020 02:41:49 +0200 Original-Received: from localhost ([::1]:37330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTEJo-0001as-CG for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Apr 2020 20:41:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTEIS-0000wL-Ky for emacs-devel@gnu.org; Mon, 27 Apr 2020 20:40:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTEIR-0004s3-TL for emacs-devel@gnu.org; Mon, 27 Apr 2020 20:40:24 -0400 Original-Received: from md5i.com ([75.151.244.229]:37142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jTEIR-0004ll-Cq for emacs-devel@gnu.org; Mon, 27 Apr 2020 20:40:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=W05uOP+jn3eSiL+DzDmZ5o98r+vX+KES5roBnxAKbQU=; b=a8U+E78ALH/6KaEU+vEloa/Nru Jp7X1sPOL3wlD4EBuelBb1AMAY0p7BrnkHMZj/6AUXoWjRDxPFlBZv2qMNtNWKtrc/IYy3ExiJ/Wc mb5Rj6AMNAzlGw15jP/H6dDZF; Original-Received: from md5i by md5i.com with local (Exim 4.93) (envelope-from ) id 1jTEIP-005UoQ-RJ for emacs-devel@gnu.org; Mon, 27 Apr 2020 20:40:21 -0400 In-Reply-To: (ndame@protonmail.com's message of "Sat, 25 Apr 2020 17:45:02 +0000") Received-SPF: pass client-ip=75.151.244.229; envelope-from=mwd@md5i.com; helo=md5i.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/27 20:40:21 X-ACL-Warn: Detected OS = ??? X-Received-From: 75.151.244.229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247976 Archived-At: ndame 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)