help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: query: remapping a mouse press


From: hw
Subject: Re: query: remapping a mouse press
Date: Mon, 27 Aug 2018 17:35:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

allan gottlieb <gottlieb@nyu.edu> writes:

> On Sun, Aug 26 2018, hw wrote:
>
>> allan gottlieb <gottlieb@nyu.edu> writes:
>>
>>> On Sun, Aug 26 2018, hw wrote:
>>>
>>>> allan gottlieb <gottlieb@nyu.edu> writes:
>>>>
> [...]
>>> I believe that this use of xinput I accomplish with xmodmap.
>>
>> How did you do that?
> [...]
>
> 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.

Oh, I mean what did you put into xmodmap to change mouse buttons?  I
thought it only deals with keys.

> [...]
>>> 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 "<down-mouse-1>") 'end-of-buffer)
>
> Bingo!  (It worked better with just mouse-1 not down-mouse-1)
>
>> That might work if Emacs gets <down-mouse-13>.  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 "<mouse-8>") 'beginning-of-buffer)
>
> Now I have to decide what to do with all the logitech physical buttons!

Cool, now you get to make the really difficult decisions ;)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]