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: Sun, 01 Aug 2021 09:18:37 +0300 Message-ID: <83a6m1ofgi.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22640"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49803@debbugs.gnu.org To: Didier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 01 08:19:11 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 1mA4oY-0005ds-Jp for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Aug 2021 08:19:10 +0200 Original-Received: from localhost ([::1]:55376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mA4oW-000480-Jn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Aug 2021 02:19:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mA4oQ-00047d-Df for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2021 02:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mA4oQ-0001V2-5s for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2021 02:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mA4oP-0008Hy-Un for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2021 02:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Aug 2021 06:19:01 +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.162779873531849 (code B ref 49803); Sun, 01 Aug 2021 06:19:01 +0000 Original-Received: (at 49803) by debbugs.gnu.org; 1 Aug 2021 06:18:55 +0000 Original-Received: from localhost ([127.0.0.1]:35370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA4oJ-0008Hd-IB for submit@debbugs.gnu.org; Sun, 01 Aug 2021 02:18:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA4oH-0008HQ-Qr for 49803@debbugs.gnu.org; Sun, 01 Aug 2021 02:18:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40824) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mA4oC-0001KR-KE; Sun, 01 Aug 2021 02:18:48 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1871 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 1mA4oC-0006jV-86; Sun, 01 Aug 2021 02:18:48 -0400 In-Reply-To: (message from Didier on Sat, 31 Jul 2021 19:27:58 -0700) 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:211037 Archived-At: > From: Didier > Date: Sat, 31 Jul 2021 19:27:58 -0700 > > I'm on a MacBook Pro with macOS Big Sur, and on both the laptop trackpad > and with my plugged in USB mouse, the wheel or 2-finger up/down on > trackpad, is reported to Emacs when in terminal as mouse-4 and mouse-5. > That means that scroll doesn't work in Terminal.app or in iTerm2 on MAC, > since mouse-4 and mouse-5 are not bound. > > In the GUI Mac it works, because it gets reported as wheel-up and > wheel-down. > > My thought is maybe here > https://github.com/emacs-mirror/emacs/blob/master/lisp/mwheel.el#L54 > there should be an additional check for if its running with a > window-system or not? I don't think I follow. The defcustoms there say: (defcustom mouse-wheel-down-event (if (or (featurep 'w32-win) (featurep 'ns-win)) 'wheel-up 'mouse-4) "Event used for scrolling down." :group 'mouse :type 'symbol :set 'mouse-wheel-change-button) (defcustom mouse-wheel-up-event (if (or (featurep 'w32-win) (featurep 'ns-win)) 'wheel-down 'mouse-5) "Event used for scrolling up." :group 'mouse :type 'symbol :set 'mouse-wheel-change-button) This seems already to cater to macOS, so why isn't it working for you?