From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: allan gottlieb Newsgroups: gmane.emacs.help Subject: Re: query: remapping a mouse press Date: Sun, 26 Aug 2018 18:13:15 -0400 Message-ID: <87va7wu684.fsf@nyu.edu> References: <87lg8wg5qi.fsf@nyu.edu> <875zzx2e49.fsf@himinbjorg.adminart.net> <8736v0vntf.fsf@nyu.edu> <87lg8szu3c.fsf@himinbjorg.adminart.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535321595 9825 195.159.176.226 (26 Aug 2018 22:13:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2018 22:13:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 27 00:13:11 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 1fu3HP-0002Mx-JJ for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Aug 2018 00:13:07 +0200 Original-Received: from localhost ([::1]:50552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fu3JV-0005sp-UW for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Aug 2018 18:15:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fu3In-0005n4-G8 for help-gnu-emacs@gnu.org; Sun, 26 Aug 2018 18:14:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fu3Hd-0002w5-7H for help-gnu-emacs@gnu.org; Sun, 26 Aug 2018 18:13:24 -0400 Original-Received: from mx.cims.nyu.edu ([128.122.49.99]:62135) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fu3Hd-0002v8-2u for help-gnu-emacs@gnu.org; Sun, 26 Aug 2018 18:13:21 -0400 Original-Received: from smtp.cs.nyu.edu (SMTP.CS.NYU.EDU [128.122.49.97]) by mx.cims.nyu.edu (8.15.1+Sun/8.15.1) with ESMTPS id w7QMDGki027127 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 26 Aug 2018 18:13:18 -0400 (EDT) Original-Received: from E7450.localdomain (ool-18be58aa.dyn.optonline.net [24.190.88.170]) (authenticated bits=0) by smtp.cs.nyu.edu (8.14.7/8.14.7) with ESMTP id w7QMDFCd009714 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 26 Aug 2018 18:13:16 -0400 Original-Received: by E7450.localdomain (Postfix, from userid 1000) id A41CB4536B; Sun, 26 Aug 2018 18:13:15 -0400 (EDT) In-Reply-To: <87lg8szu3c.fsf@himinbjorg.adminart.net> (hw's message of "Sun, 26 Aug 2018 23:38:47 +0200") X-Greylist: inspected by milter-greylist-4.6.2 (mx.cims.nyu.edu [128.122.49.99]); Sun, 26 Aug 2018 18:13:18 -0400 (EDT) for IP:'128.122.49.97' DOMAIN:'SMTP.CS.NYU.EDU' HELO:'smtp.cs.nyu.edu' FROM:'gottlieb@nyu.edu' RCPT:'' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx.cims.nyu.edu [128.122.49.99]); Sun, 26 Aug 2018 18:13:18 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.4 at mx X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.80 on 128.122.49.99 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 128.122.49.99 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:117764 Archived-At: On Sun, Aug 26 2018, hw wrote: > 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. I used xev to find our which "logic buttons" is generated by each of the mouse's "physical buttons". Then I used xmodmap to change the logical buttons (this is easy with xmodmap), but probable that was not necessary. >> 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) Bingo! (It worked better with just mouse-1 not down-mouse-1) > 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. That remapping is what I use xmodmap for (see above). But it is necessary emacs is delighted with (global-set-key (kbd "") 'beginning-of-buffer) Now I have to decide what to do with all the logitech physical buttons! Thanks again, allan