From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: hw Newsgroups: gmane.emacs.help Subject: Re: query: remapping a mouse press Date: Sun, 26 Aug 2018 23:38:47 +0200 Organization: my virtual residence Message-ID: <87lg8szu3c.fsf@himinbjorg.adminart.net> References: <87lg8wg5qi.fsf@nyu.edu> <875zzx2e49.fsf@himinbjorg.adminart.net> <8736v0vntf.fsf@nyu.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535319679 31899 195.159.176.226 (26 Aug 2018 21:41:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2018 21:41:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 26 23:41:15 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fu2mY-0008Bi-9h for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Aug 2018 23:41:14 +0200 Original-Received: from localhost ([::1]:50477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fu2oe-0000BD-0l for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Aug 2018 17:43:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fu2o0-0008OD-3J for help-gnu-emacs@gnu.org; Sun, 26 Aug 2018 17:42:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fu2kT-00026n-BU for help-gnu-emacs@gnu.org; Sun, 26 Aug 2018 17:39:05 -0400 Original-Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::10]:22389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fu2kS-00025Y-SV for help-gnu-emacs@gnu.org; Sun, 26 Aug 2018 17:39:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1535319542; s=strato-dkim-0002; d=adminart.net; h=Sender:References:Message-ID:Date:In-Reply-To:Subject:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=kkLWPThEqHgvdHPj/5BOS67+0vv1N9rM5jtAn+Y3S1k=; b=SsyPGj+EaBfLjLJO8KgZ3jW8hhnuVEegFNluq7HtS7D4ay/YlbUoEHurt+fmsweK0R 7kh/UALtU2zAm32/eZhUxw0CYEzdYBdBKK32VpF76FuC11/rICHJUq3P4bepVIVUHHOh 4UUP5WIvdgXtjyeXXHC0Ep4/hN6a9bu6NUo5TKWymZHaJiZrWgdauWJK/TrUppcMmhyP oX4TE5P4Qut6F/TVV+SlrDZCHVlP7jsdftlF+kdIX8vePnltROh1rRXj/0EAjH+Q04Z9 IGVc9tfan+mpVDDdZzgGRFPb8nDQJz3DwtC69SGlp837y3I5Tm64CM9uu8dlikNyQ7Ne WrVg== X-RZG-AUTH: ":O2kGeEG7b/pS1FS4THaxjVF9w0vVgfQ9xGcjwO5WMRo5c+h5ceMqQWZ3yrBp+AVdIIwXjneEe9k=" X-RZG-CLASS-ID: mo00 Original-Received: from lee by himinbjorg.adminart.net with local (Exim 4.90_1) (envelope-from ) id 1fu2kP-0000mi-Tf for help-gnu-emacs@gnu.org; Sun, 26 Aug 2018 23:39:01 +0200 In-Reply-To: <8736v0vntf.fsf@nyu.edu> (allan gottlieb's message of "Sun, 26 Aug 2018 17:07:56 -0400") Mail-Followup-To: help-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::10 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117763 Archived-At: allan gottlieb writes: > On Sun, Aug 26 2018, hw wrote: > >> allan gottlieb writes: >> >>> I am having trouble enabling mouse-wheel-tilt-scroll > [...] >> You can use xinput to configure which physical button on a mouse (or trackball, >> in this example) is being mapped to which logical button like so: > [...] > > Thank you. > > I believe that this use of xinput I accomplish with xmodmap. How did you do that? I prefer xmodmap because it's way less complicated, but there seem to be things that can not be done with it, and mapping mouse buttons seemed to be one of them. > My question is "downstream" of that. Assuming I have configured the > mouse (in my case via xmodmap) and when I push a certain physical button > it generates a pair of x events > > ButtonPress event, serial 36, synthetic NO, window 0x4200001, > root 0x13b, subw 0x0, time 28609618, (45,96), root:(464,877), > state 0x10, button 13, same_screen YES > > ButtonRelease event, serial 36, synthetic NO, window 0x4200001, > root 0x13b, subw 0x0, time 28609820, (54,94), root:(473,875), > state 0x10, button 13, same_screen YES > > How do I tell emacs to do something (say end-of-buffer) when button 13 > is pressed? Does Emacs receive the event? You can test with (describe-key). I could probably use something like this: (global-set-key (kbd "") 'end-of-buffer) That might work if Emacs gets . If it doesn't know that many buttons and you're not running out of button numbers, perhaps you can re-map the buttons with xinput so they have lower button mumbers Emacs can understand.