From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49803: 27.2; Mouse wheel on MacOS is reported as mouse-4 and mouse-5, but Emacs mwheel seems to use wheel-up/wheel-down instead Date: Wed, 11 Aug 2021 20:38:18 +0300 Message-ID: <83h7fvevat.fsf@gnu.org> References: <83a6m1ofgi.fsf@gnu.org> <83r1fcm6rh.fsf@gnu.org> <87k0kusygj.fsf@gmail.com> <83v94dfozn.fsf@gnu.org> <87v94cqqop.fsf@gmail.com> <83sfzgdw96.fsf@gnu.org> <87r1f0qb6m.fsf@gmail.com> <83mtpodjd4.fsf@gnu.org> <87mtpnrjok.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20789"; mail-complaints-to="usenet@ciao.gmane.io" Cc: didibus@gmail.com, 49803@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 11 19:39:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mDsCC-000597-90 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 19:39:16 +0200 Original-Received: from localhost ([::1]:55096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDsCB-0003ar-3x for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 13:39:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDsC1-0003aG-3D for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 13:39:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDsBz-0006ES-Ib for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 13:39:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDsBy-0007z5-2z for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 13:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Aug 2021 17:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49803 X-GNU-PR-Package: emacs Original-Received: via spool by 49803-submit@debbugs.gnu.org id=B49803.162870349530637 (code B ref 49803); Wed, 11 Aug 2021 17:39:02 +0000 Original-Received: (at 49803) by debbugs.gnu.org; 11 Aug 2021 17:38:15 +0000 Original-Received: from localhost ([127.0.0.1]:36466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDsBC-0007y4-Vb for submit@debbugs.gnu.org; Wed, 11 Aug 2021 13:38:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDsBA-0007xs-Ni for 49803@debbugs.gnu.org; Wed, 11 Aug 2021 13:38:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39764) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDsB5-0005cD-GG; Wed, 11 Aug 2021 13:38:07 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1182 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDsB5-00021F-2j; Wed, 11 Aug 2021 13:38:07 -0400 In-Reply-To: <87mtpnrjok.fsf@gmail.com> (message from Robert Pluim on Wed, 11 Aug 2021 19:10:51 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211620 Archived-At: > From: Robert Pluim > Cc: didibus@gmail.com, 49803@debbugs.gnu.org > Date: Wed, 11 Aug 2021 19:10:51 +0200 > > Something like this. We can discuss if xterm-mouse-map-buttons should > default to t on ns-win or not. I think it should, because then using > the mouse wheel with builtin and external trackpads becomes: > > (require 'mwheel) > (require 'mouse) > (xterm-mouse-mode t) > (mouse-wheel-mode t) > > with no other configuration required. > > diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el > index 72faff8101..7906a6a024 100644 > --- a/lisp/xt-mouse.el > +++ b/lisp/xt-mouse.el > @@ -42,6 +42,28 @@ > > (defvar xterm-mouse-debug-buffer nil) > > +(defcustom xterm-mouse-map-buttons > + (if (featurep 'ns-win) > + t > + nil) > + "Non-nil if xterm should perfom mouse button mappings. > +Will use `xterm-mouse-map-buttons-alist' for the mapping. > +Defaults to t when using macOS for consistency with 'mwheel'." > + :type 'boolean > + :version "28.1" > + :group 'xterm) So you are saying that by moving this from mwheel.el, we avoid the danger of using the wrong mapping on TTY frames on macOS?