From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim 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 11:24:54 +0200 Message-ID: <87v94cqqop.fsf@gmail.com> References: <83a6m1ofgi.fsf@gnu.org> <83r1fcm6rh.fsf@gnu.org> <87k0kusygj.fsf@gmail.com> <83v94dfozn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26403"; mail-complaints-to="usenet@ciao.gmane.io" Cc: didibus@gmail.com, 49803@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 11 11:26:18 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 1mDkV7-0006fJ-UT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 11:26:17 +0200 Original-Received: from localhost ([::1]:48228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDkV6-0005Ay-Dc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 05:26:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDkV1-0005Aq-8t for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 05:26:11 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDkUt-0004kM-Oy for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 05:26:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDkUs-0005w4-Cj for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 05:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Aug 2021 09:26: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.162867390422743 (code B ref 49803); Wed, 11 Aug 2021 09:26:02 +0000 Original-Received: (at 49803) by debbugs.gnu.org; 11 Aug 2021 09:25:04 +0000 Original-Received: from localhost ([127.0.0.1]:33409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDkTw-0005uj-8Z for submit@debbugs.gnu.org; Wed, 11 Aug 2021 05:25:04 -0400 Original-Received: from mail-wm1-f53.google.com ([209.85.128.53]:39629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDkTu-0005u8-OI for 49803@debbugs.gnu.org; Wed, 11 Aug 2021 05:25:03 -0400 Original-Received: by mail-wm1-f53.google.com with SMTP id f9-20020a05600c1549b029025b0f5d8c6cso3903507wmg.4 for <49803@debbugs.gnu.org>; Wed, 11 Aug 2021 02:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=5MHYGe7VayiD2NxrpFZMAYhBFYRy9xx70SxQE3vJbtI=; b=soUvkgW4zIW1NPtsUqNDbm8sm+qvCveCyn+Nz+4BSV1xVor+wqg3Zy4mAdoIZp1Lor Wmh8UxKrIE8NHrOOzql9RmjafcVj2EbfLQFVRcWJ/69eW15S1pfldGZVzVC3dH0hVITD vxMUIk8i7pVR5FLvcnYKUpzP0gqFpiv/Urt5MOFCLsDnEG92TNzBb9OoWt2ecZitEf28 42JmUCrDQPVEk3hjAJMxuiR7zZwx5XszKbo4uUYzNryC16rscbphn/4A9O+BOH9QjZBI guW13GEjeXmCwGPD3HAIGx+0bWj+JZbgkFDvIUv9DUTT36R78EpnBp23aomSVmwdXQNT Smeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=5MHYGe7VayiD2NxrpFZMAYhBFYRy9xx70SxQE3vJbtI=; b=ZGQbwJ5aAtdV1vBs7V3EECPlSfSv2fXLVlf6oO/03sfGiUQjWlQIHaadtMDHOqR7cP 5gvTW/8HpbrNWB1PPKPg7xl1xhkFVbSMW2W9QojVu5IFyKHspc7gBtZnLEBApL9U5YRp VcR2Xf8ImdL/2uMwGAJ7zc4+mC+CY7bZyb+PTzz2XHUyHDzbLxfvxEw9Fq3I+AioIrw1 fYUrR7/N9XbtrHHMY+LBTChuETss64FZA8bKXYDg2KaTiZppN9dRRpT41Y6bJoJ3i5vU 3hVyknXny5QS8hzjUD5rOIu9LYd7tniN0RAYGCv49OhZJu0Plw8/joHtQSyGEv46jfMA dy/w== X-Gm-Message-State: AOAM530BOkeJs3DXypTuRxp+r4ehHjvuBBgbMmSE4HWtHU+A9zd436ON 96uRX45f+Ls0TrzUGX0jYyTk5dTc8VA= X-Google-Smtp-Source: ABdhPJy5Oz0bKFRkDDS2o+jLhnBSHyGhvM+Ept4SulFwSENRtKoxAB3R+BNtaHC7NYqmCJFMbL6sgA== X-Received: by 2002:a1c:3841:: with SMTP id f62mr1368787wma.60.1628673896550; Wed, 11 Aug 2021 02:24:56 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id o17sm5047603wmp.13.2021.08.11.02.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 02:24:55 -0700 (PDT) In-Reply-To: <83v94dfozn.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 10 Aug 2021 15:44:44 +0300") 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:211560 Archived-At: >>>>> On Tue, 10 Aug 2021 15:44:44 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: Didier , 49803@debbugs.gnu.org >> Date: Mon, 09 Aug 2021 12:29:32 +0200 >>=20 >> >> So I think it should be modified to something like: >> >>=20 >> >> (if (or (featurep 'w32-win) (and (display-graphic-p) (featurep 'n= s-win))) >> >> 'wheel-down >> >> 'mouse-5) >>=20 Eli> Did you try that? >>=20 Eli> The problem here is that the initial frame is not a GUI frame even= in Eli> a GUI session, so the defcustom could pick up the wrong value. >>=20 >> If we knew where and how the events were being received by emacs we >> could map them to wheel-{up,down}, but I=CA=BCve not succeeded there. Eli> Where were you looking? These events are formatted into Lisp in Eli> keyboard.c; search for "wheel-". I was unclear: I hadn't figured out how to get the relevant terminal programs to generate either wheel-up/down or mouse-4/5. It looks like iterm2 sends mouse events using the xterm protocol, which xt-mouse then posts as mouse-4/5 events. I guess we could modify xt-mouse to optionally send them as wheel-up/down instead, but that feels like a hack. Do we have a generic mapping mechanism for mouse events? I guess they=CA=BCre not keys, so keyboard-translate won't work. Eli> I guess the difference is between systems where the GUI API tells = us Eli> explicitly whether its a wheel-up/down event, and systems where we Eli> just get "button number N" event. Or something like that. This is using emacs -nw, so the gui api is not involved. Robert --=20