From: allan gottlieb <gottlieb@nyu.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: query: remapping a mouse press
Date: Sun, 26 Aug 2018 17:07:56 -0400 [thread overview]
Message-ID: <8736v0vntf.fsf@nyu.edu> (raw)
In-Reply-To: <875zzx2e49.fsf@himinbjorg.adminart.net> (hw's message of "Sun, 26 Aug 2018 20:10:14 +0200")
On Sun, Aug 26 2018, hw wrote:
> allan gottlieb <gottlieb@nyu.edu> writes:
>
>> I am having trouble enabling mouse-wheel-tilt-scroll
>>
>> Currently I have
>>
>> mouse-wheel-tilt-scroll is a variable defined in `mwheel.el'.
>> Its value is t
>> Original value was nil
>>
>> Possibly it is because my logitech mouse has many buttons and tilting
>> the wheel generates mouse-6 and mouse-7, which are bound to scroll-down
>> and scroll-up. I want to bind mouse-6 to scroll-left and tried several
>> variations on
>>
>> (define-key global-map <mouse-6> 'scroll-left)
>>
>> but with no success.
>>
>> Any help would be appreciated.
>
> FWIW:
>
> 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:
>
>
> xinput set-button-map "Kensington Kensington Slimblade Trackball" 2 1
> 3 4 5 6 7 8 9 10 11 12
> xinput --set-prop "Kensington Kensington Slimblade Trackball" "Evdev
> Wheel Emulation" 1
> xinput --set-prop "Kensington Kensington Slimblade Trackball" "Evdev
> Wheel Emulation Button" 3
> xinput --set-prop "Kensington Kensington Slimblade Trackball" "Evdev
> Wheel Emulation Axes" 6, 7, 4, 5
>
>
> This example is for when you use the trackball with your left hand.
Thank you.
I believe that this use of xinput I accomplish with xmodmap.
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?
thanks again,
allan
next prev parent reply other threads:[~2018-08-26 21:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 20:58 query: remapping a mouse press allan gottlieb
2018-08-23 23:08 ` Tak Kunihiro
[not found] ` <87h8jkzaw2.fsf@nyu.edu>
2018-08-25 5:15 ` Tak Kunihiro
2018-08-25 15:38 ` allan gottlieb
2018-08-26 18:10 ` hw
2018-08-26 21:07 ` allan gottlieb [this message]
2018-08-26 21:38 ` hw
2018-08-26 22:13 ` allan gottlieb
2018-08-27 15:35 ` hw
2018-08-27 21:13 ` allan gottlieb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736v0vntf.fsf@nyu.edu \
--to=gottlieb@nyu.edu \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.