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 19:41:27 +0300 Message-ID: <83mtpodjd4.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21686"; 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 18:42:13 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 1mDrIx-0005NY-KN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 18:42:11 +0200 Original-Received: from localhost ([::1]:58658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDrIw-0007Bz-EN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 12:42:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDrIo-00079I-P7 for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 12:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDrIo-0008Ti-Hu for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 12:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDrIo-0006Wq-C7 for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 12:42: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 16:42: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.162870008225037 (code B ref 49803); Wed, 11 Aug 2021 16:42:02 +0000 Original-Received: (at 49803) by debbugs.gnu.org; 11 Aug 2021 16:41:22 +0000 Original-Received: from localhost ([127.0.0.1]:36422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDrI9-0006Vk-QJ for submit@debbugs.gnu.org; Wed, 11 Aug 2021 12:41:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDrI8-0006VT-9q for 49803@debbugs.gnu.org; Wed, 11 Aug 2021 12:41:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37776) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDrI2-0007tu-Rm; Wed, 11 Aug 2021 12:41:15 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1660 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 1mDrI2-0002Dy-F5; Wed, 11 Aug 2021 12:41:14 -0400 In-Reply-To: <87r1f0qb6m.fsf@gmail.com> (message from Robert Pluim on Wed, 11 Aug 2021 16:59:45 +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:211615 Archived-At: > From: Robert Pluim > Cc: didibus@gmail.com, 49803@debbugs.gnu.org > Date: Wed, 11 Aug 2021 16:59:45 +0200 > > Eli> Does the xterm protocol allow to report wheel events, or does it only > Eli> allow to report mouse-click events? If the latter, I don't see how > Eli> you could map the events in any way different from what we have now, > Eli> i.e. via a user-controlled setting. > > It allows reporting wheel events, but as that part of the protocol is > not being used by the iterm2 everything is reported as mouse clicks, > but thatʼs immaterial: > > - terminal sends "\e[<" to indicate itʼs sending us a mouse event > - xt-mouse.el reads and decodes a bunch of stuff from the terminal > - xt-mouse.el produces a 'mouse-' event from that bunch of stuff, and > pushes it onto 'unread-command-events' But then any mapping of mouse-4 etc. to wheel events is pure heuristics, right? There are mice out there which have more than 3 buttons, and they can legitimately produce mouse-4 for the 4th button, right? > So the only place I can see to add the optional mapping is in xt-mouse.el > itself, or in 'read-char' in keyboard.c > > Itʼs easier to do in xt-mouse.el, and as far as I can tell thatʼs the > only terminal mouse handling code that does this kind of thing (GPM is > handled in keyboard.c) If I'm right, and this mapping is based on heuristics, we cannot hard-code it, we must allow users to control the mapping in case the heuristics fails. Or am I missing something?