all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Assigning extra mouse buttons (eg. MX Ergo trackball)
@ 2019-11-03 13:29 jonetsu
  2019-11-05 11:59 ` Michael Heerdegen
  0 siblings, 1 reply; 2+ messages in thread
From: jonetsu @ 2019-11-03 13:29 UTC (permalink / raw
  To: help-gnu-emacs

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.

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:

ButtonPress event, serial 37, synthetic NO, window 0x5000001,
    root 0x115, subw 0x0, time 7662467, (89,97), root:(800,619),
    state 0x0, button 6, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x5000001,
    root 0x115, subw 0x0, time 7662467, (89,97), root:(800,619),
    state 0x0, button 6, same_screen YES

ButtonPress event, serial 37, synthetic NO, window 0x5000001,
    root 0x115, subw 0x0, time 7663797, (89,97), root:(800,619),
    state 0x0, button 7, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x5000001,
    root 0x115, subw 0x0, time 7663797, (89,97), root:(800,619),
    state 0x0, button 7, same_screen YES

Is it possible to bring buttons 6 and 7 to emacs ?





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Assigning extra mouse buttons (eg. MX Ergo trackball)
  2019-11-03 13:29 Assigning extra mouse buttons (eg. MX Ergo trackball) jonetsu
@ 2019-11-05 11:59 ` Michael Heerdegen
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen @ 2019-11-05 11:59 UTC (permalink / raw
  To: jonetsu; +Cc: help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-05 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-03 13:29 Assigning extra mouse buttons (eg. MX Ergo trackball) jonetsu
2019-11-05 11:59 ` Michael Heerdegen

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.