* Patch: Info-mode bindings for forward and back mouse buttons
@ 2007-03-20 20:14 Teddy Hogeborn
2007-03-21 13:41 ` Drew Adams
2007-03-21 13:54 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Teddy Hogeborn @ 2007-03-20 20:14 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
When using a common type of mouse with two normal buttons, a scroll
wheel, and two side thumb buttons for "forward" and "back", the last
two buttons are not bound in Info-mode. Patch below.
(As the buttons are not currently bound to anything, I assume that it
is not crucial to make absolutely sure that mouse-6 and mouse-7 have
no other meaning on some other type of mouse.)
Someone might argue that this should instead be part of mwheel.el, and
I have no opinion on that, as long as the buttons work by default.
/Teddy
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to add mouse button bindings to Info mode --]
[-- Type: text/x-patch, Size: 702 bytes --]
Index: lisp/info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.497
diff -c -r1.497 info.el
*** lisp/info.el 10 Feb 2007 11:10:49 -0000 1.497
--- lisp/info.el 20 Mar 2007 20:07:17 -0000
***************
*** 3173,3178 ****
--- 3173,3180 ----
(define-key Info-mode-map "," 'Info-index-next)
(define-key Info-mode-map "\177" 'Info-scroll-down)
(define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node)
+ (define-key Info-mode-map [mouse-6] 'Info-history-forward)
+ (define-key Info-mode-map [mouse-7] 'Info-history-back)
(define-key Info-mode-map [follow-link] 'mouse-face)
)
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Patch: Info-mode bindings for forward and back mouse buttons
2007-03-20 20:14 Patch: Info-mode bindings for forward and back mouse buttons Teddy Hogeborn
@ 2007-03-21 13:41 ` Drew Adams
2007-03-21 13:54 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2007-03-21 13:41 UTC (permalink / raw)
To: Teddy Hogeborn, emacs-devel
> When using a common type of mouse with two normal buttons, a scroll
> wheel, and two side thumb buttons for "forward" and "back", the last
> two buttons are not bound in Info-mode. Patch below.
>
> (As the buttons are not currently bound to anything, I assume that it
> is not crucial to make absolutely sure that mouse-6 and mouse-7 have
> no other meaning on some other type of mouse.)
>
> Someone might argue that this should instead be part of mwheel.el, and
> I have no opinion on that, as long as the buttons work by default.
I suggested this long ago (but with mouse-4 and mouse-5), and I use it in my
own customizations. The suggestion was not adopted. The decision here was
that there is too large a variety of mice to try to do this successfully.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch: Info-mode bindings for forward and back mouse buttons
2007-03-20 20:14 Patch: Info-mode bindings for forward and back mouse buttons Teddy Hogeborn
2007-03-21 13:41 ` Drew Adams
@ 2007-03-21 13:54 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2007-03-21 13:54 UTC (permalink / raw)
To: Teddy Hogeborn; +Cc: emacs-devel
> When using a common type of mouse with two normal buttons, a scroll
> wheel, and two side thumb buttons for "forward" and "back", the last
> two buttons are not bound in Info-mode. Patch below.
> (As the buttons are not currently bound to anything, I assume that it
> is not crucial to make absolutely sure that mouse-6 and mouse-7 have
> no other meaning on some other type of mouse.)
Actually it is: several devices now offer "horizontal wheels" of one sort or
another and typically use buttons 6 and 7 for that. You can do that for
example with the "EmulateWheel" in X.org which allows you to simulate a (2
dimensional) wheel by pressing a mouse button (typically mouse-2) in
which case. unless you precisely move the mouse only vertically, you'll
inevitably get some horizontal-scroll events as well. Binding those events
to history-forward and history-backward makes the whole thing unusable.
> Someone might argue that this should instead be part of mwheel.el, and
> I have no opinion on that, as long as the buttons work by default.
Actually, I think that we should add bindings such as
(define-key Info-mode-map [hist-forward] 'Info-history-forward)
(define-key Info-mode-map [hist-backward] 'Info-history-back)
and you'd then only need to add to your .emacs settings such as:
(define-key function-key-map [mouse-6] [hist-forward])
(define-key function-key-map [mouse-7] [hist-backward])
and I could add similar bindings in my .emacs for the special keys on my
keyboard that offer the same functionality.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-21 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 20:14 Patch: Info-mode bindings for forward and back mouse buttons Teddy Hogeborn
2007-03-21 13:41 ` Drew Adams
2007-03-21 13:54 ` Stefan Monnier
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.