[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assigning extra mouse buttons (eg. MX Ergo trackball)
From: |
Michael Heerdegen |
Subject: |
Re: Assigning extra mouse buttons (eg. MX Ergo trackball) |
Date: |
Tue, 05 Nov 2019 12:59:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
jonetsu <jonetsu@teksavvy.com> writes:
> Hello,
>
> Got a 'new' Logitech MX Ergo trackball ... Is there a way to assign the
> two extra buttons within emacs ? When pressed emacs shows 'mouse-8' and
> 'mouse-9'. Nothing much so far but I'd like to assign them to page up
> and page down.
In principle you can assign mouse events using the same functions as for
"normal" keys, e.g.
(global-set-key [mouse-8] #'your-command-here)
If you want to scroll with mouse-8 and mouse-9 but with a different
scroll amount, you probably want to bind those to `mwheel-scroll' (like
the normal scroll wheel mouse keys) and setup things in a way that the
different scroll amount is used. You would probably need to advice the
command `mwheel-scroll' though because the option
`mouse-wheel-scroll-amount' only looks for modifiers but not for the
base event.
> Another feature that could be useful is that the scroll wheel can also
> be clicked sideways, one click when titled left, one click when tilted
> right. In this case however emacs does not show anything at all in its
> status bar.
>
> xev will show these as buttons 6 and 7:
> Is it possible to bring buttons 6 and 7 to emacs ?
I don't know. Normally any event gets through to Emacs unless the
window manager or something else is already catching it.
Michael.