Amend the section on wheeled mice in X to include a tutorial on installing
and configuring the imwheel port. Also, add a man-ref entry for imwheel(1). Reviewed by: chris, jim
This commit is contained in:
parent
e67d9fc70a
commit
66be53c66d
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6685
3 changed files with 402 additions and 5 deletions
|
@ -13,7 +13,7 @@
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.43 2000/02/24 18:28:20 jhb Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.44 2000/03/07 13:47:55 nik Exp $</pubdate>
|
||||||
|
|
||||||
<abstract>
|
<abstract>
|
||||||
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
||||||
|
@ -5077,7 +5077,205 @@ make this work, ``<filename>/dev/mouse</filename>'' should be linked to
|
||||||
|
|
||||||
<answer>
|
<answer>
|
||||||
<para>Yes. But you need to customize X client programs. See <ulink
|
<para>Yes. But you need to customize X client programs. See <ulink
|
||||||
URL="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/)</ulink></para>
|
URL="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/)</ulink>.</para>
|
||||||
|
|
||||||
|
<para>If you want to use the
|
||||||
|
<application>imwheel</application> program, just follow
|
||||||
|
these simple steps.</para>
|
||||||
|
|
||||||
|
<orderedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>Translate the Wheel Events</para>
|
||||||
|
|
||||||
|
<para>The <application>imwheel</application> program
|
||||||
|
works by translating mouse button 4 and mouse button 5
|
||||||
|
events into key events. Thus, you have to get the
|
||||||
|
mouse driver to translate mouse wheel events to button
|
||||||
|
4 and 5 events. There are two ways of doing this, the
|
||||||
|
first way is to have &man.moused.8; do the
|
||||||
|
translation. The second way is for the X server
|
||||||
|
itself to do the event translation.</para>
|
||||||
|
|
||||||
|
<orderedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>Using &man.moused.8; to Translate Wheel
|
||||||
|
Events</para>
|
||||||
|
|
||||||
|
<para>To have &man.moused.8; perform the event
|
||||||
|
translations, simply add <option>-z 4</option> to
|
||||||
|
the command line used to start &man.moused.8;.
|
||||||
|
For example, if you normally start &man.moused.8;
|
||||||
|
via <command>moused -p /dev/psm0</command> you
|
||||||
|
would start it by entering <command>moused -p
|
||||||
|
/dev/psm0 -z 4</command> instead. If you start
|
||||||
|
&man.moused.8; automatically during bootup via
|
||||||
|
<filename>/etc/rc.conf</filename>, you can simply
|
||||||
|
add <option>-z 4</option> to the
|
||||||
|
<varname>moused_flags</varname> variable in
|
||||||
|
<filename>/etc/rc.conf</filename>.</para>
|
||||||
|
|
||||||
|
<para>You now need to tell X that you have a 5
|
||||||
|
button mouse. To do this, simply add the line
|
||||||
|
<literal>Buttons 5</literal> to the
|
||||||
|
<quote>Pointer</quote> section of
|
||||||
|
<filename>/etc/XF86Config</filename>. For
|
||||||
|
example, you might have the following
|
||||||
|
<quote>Pointer</quote> section in
|
||||||
|
<filename>/etc/XF86Config</filename>.</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><quote>Pointer</quote> Section for Wheeled
|
||||||
|
Mouse in XF86Config with moused
|
||||||
|
Translation</title>
|
||||||
|
|
||||||
|
<programlisting>Section "Pointer"
|
||||||
|
Protocol "SysMouse"
|
||||||
|
Device "/dev/sysmouse"
|
||||||
|
Buttons 5
|
||||||
|
EndSection
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Using Your X Server to Translate the Wheel
|
||||||
|
Events</para>
|
||||||
|
|
||||||
|
<para>If you aren't running &man.moused.8;, or if
|
||||||
|
you don't want &man.moused.8; to translate your
|
||||||
|
wheel events, you can have the X server do the
|
||||||
|
event translation instead. This requires a couple
|
||||||
|
of modifications to your
|
||||||
|
<filename>/etc/XF86Config</filename> file. First,
|
||||||
|
you need to choose the proper protocol for your
|
||||||
|
mouse. Most wheeled mice use the
|
||||||
|
<quote>IntelliMouse</quote> protocol. However,
|
||||||
|
XFree86 does support other protocols, such as
|
||||||
|
<quote>MouseManPlusPS/2</quote> for the Logitech
|
||||||
|
MouseMan+ mice. Once you have chosen the protocol
|
||||||
|
you will use, you need to add a
|
||||||
|
<varname>Protocol</varname> line to the
|
||||||
|
<quote>Pointer</quote> section.</para>
|
||||||
|
|
||||||
|
<para>Secondly, you need to tell the X server to
|
||||||
|
remap wheel scroll events to mouse buttons 4 and
|
||||||
|
5. This is done with the
|
||||||
|
<varname>ZAxisMapping</varname> option.</para>
|
||||||
|
|
||||||
|
<para>For example, if you aren't using
|
||||||
|
&man.moused.8;, and you have an IntelliMouse
|
||||||
|
attached to the PS/2 mouse port you would use
|
||||||
|
the following in
|
||||||
|
<filename>/etc/XF86Config</filename>.</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><quote>Pointer</quote> Section for Wheeled
|
||||||
|
Mouse in <filename>XF86Config</filename> with X
|
||||||
|
Server Translation</title>
|
||||||
|
|
||||||
|
<programlisting>Section "Pointer"
|
||||||
|
Protocol "IntelliMouse"
|
||||||
|
Device "/dev/psm0"
|
||||||
|
ZAxisMapping 4 5
|
||||||
|
EndSection
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Install <application>imwheel</application></para>
|
||||||
|
|
||||||
|
<para>Next, install <application>imwheel</application>
|
||||||
|
from the Ports collection. It can be found in the
|
||||||
|
<filename>x11</filename> category. This program will
|
||||||
|
map the wheel events from your mouse into keyboard
|
||||||
|
events. For example, it might send <keycap>Page
|
||||||
|
Up</keycap> to a program when you scroll the wheel
|
||||||
|
forwards. <application>Imwheel</application> uses a
|
||||||
|
configuration file to map the wheel events to
|
||||||
|
keypresses so that it can send different keys to
|
||||||
|
different applications. The default
|
||||||
|
<application>imwheel</application> configuration file
|
||||||
|
is installed in
|
||||||
|
<filename>/usr/X11R6/etc/imwheelrc</filename>. You
|
||||||
|
can copy it to <filename>~/.imwheelrc</filename> and
|
||||||
|
then edit it if you wish to customize
|
||||||
|
<application>imwheel</application>'s configuration.
|
||||||
|
The format of the configuration file is documented in
|
||||||
|
&man.imwheel.1;.</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Configure <application>Emacs</application> to Work
|
||||||
|
with <application>Imwheel</application>
|
||||||
|
(<emphasis>optional</emphasis>)</para>
|
||||||
|
|
||||||
|
<para>If you use <application>emacs</application> or
|
||||||
|
<application>Xemacs</application>, then you need to
|
||||||
|
add a small section to your
|
||||||
|
<filename>~/.emacs</filename> file. For
|
||||||
|
<application>emacs</application>, add the
|
||||||
|
following:</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><application>Emacs</application> Configuration
|
||||||
|
for <application>Imwheel</application></title>
|
||||||
|
|
||||||
|
<programlisting>;;; For imwheel
|
||||||
|
(setq imwheel-scroll-interval 3)
|
||||||
|
(defun imwheel-scroll-down-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-down imwheel-scroll-interval))
|
||||||
|
(defun imwheel-scroll-up-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-up imwheel-scroll-interval))
|
||||||
|
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
||||||
|
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
||||||
|
;;; end imwheel section
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<para>For <application>Xemacs</application>, add the
|
||||||
|
following to your <filename>~/.emacs</filename> file
|
||||||
|
instead:</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><application>Xemacs</application> Configuration
|
||||||
|
for <application>Imwheel</application></title>
|
||||||
|
|
||||||
|
<programlisting>;;; For imwheel
|
||||||
|
(setq imwheel-scroll-interval 3)
|
||||||
|
(defun imwheel-scroll-down-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-down imwheel-scroll-interval))
|
||||||
|
(defun imwheel-scroll-up-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-up imwheel-scroll-interval))
|
||||||
|
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
||||||
|
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
||||||
|
;;; end imwheel section
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Run <application>Imwheel</application></para>
|
||||||
|
|
||||||
|
<para>You can just type <command>imwheel</command>
|
||||||
|
in an xterm to start it up once it is installed. It
|
||||||
|
will background itself and take effect immediately.
|
||||||
|
If you want to always use
|
||||||
|
<application>imwheel</application>, simply add it to
|
||||||
|
your <filename>.xinitrc</filename> or
|
||||||
|
<filename>.xsession</filename> file. You can safely
|
||||||
|
ignore any warnings <application>imwheel</application>
|
||||||
|
displays about PID files. Those warnings only apply
|
||||||
|
to the Linux version of
|
||||||
|
<application>imwheel</application>.</para>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.43 2000/02/24 18:28:20 jhb Exp $</pubdate>
|
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.44 2000/03/07 13:47:55 nik Exp $</pubdate>
|
||||||
|
|
||||||
<abstract>
|
<abstract>
|
||||||
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
<para>This is the FAQ for FreeBSD versions 2.X and 3.X. All entries
|
||||||
|
@ -5077,7 +5077,205 @@ make this work, ``<filename>/dev/mouse</filename>'' should be linked to
|
||||||
|
|
||||||
<answer>
|
<answer>
|
||||||
<para>Yes. But you need to customize X client programs. See <ulink
|
<para>Yes. But you need to customize X client programs. See <ulink
|
||||||
URL="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/)</ulink></para>
|
URL="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/)</ulink>.</para>
|
||||||
|
|
||||||
|
<para>If you want to use the
|
||||||
|
<application>imwheel</application> program, just follow
|
||||||
|
these simple steps.</para>
|
||||||
|
|
||||||
|
<orderedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>Translate the Wheel Events</para>
|
||||||
|
|
||||||
|
<para>The <application>imwheel</application> program
|
||||||
|
works by translating mouse button 4 and mouse button 5
|
||||||
|
events into key events. Thus, you have to get the
|
||||||
|
mouse driver to translate mouse wheel events to button
|
||||||
|
4 and 5 events. There are two ways of doing this, the
|
||||||
|
first way is to have &man.moused.8; do the
|
||||||
|
translation. The second way is for the X server
|
||||||
|
itself to do the event translation.</para>
|
||||||
|
|
||||||
|
<orderedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>Using &man.moused.8; to Translate Wheel
|
||||||
|
Events</para>
|
||||||
|
|
||||||
|
<para>To have &man.moused.8; perform the event
|
||||||
|
translations, simply add <option>-z 4</option> to
|
||||||
|
the command line used to start &man.moused.8;.
|
||||||
|
For example, if you normally start &man.moused.8;
|
||||||
|
via <command>moused -p /dev/psm0</command> you
|
||||||
|
would start it by entering <command>moused -p
|
||||||
|
/dev/psm0 -z 4</command> instead. If you start
|
||||||
|
&man.moused.8; automatically during bootup via
|
||||||
|
<filename>/etc/rc.conf</filename>, you can simply
|
||||||
|
add <option>-z 4</option> to the
|
||||||
|
<varname>moused_flags</varname> variable in
|
||||||
|
<filename>/etc/rc.conf</filename>.</para>
|
||||||
|
|
||||||
|
<para>You now need to tell X that you have a 5
|
||||||
|
button mouse. To do this, simply add the line
|
||||||
|
<literal>Buttons 5</literal> to the
|
||||||
|
<quote>Pointer</quote> section of
|
||||||
|
<filename>/etc/XF86Config</filename>. For
|
||||||
|
example, you might have the following
|
||||||
|
<quote>Pointer</quote> section in
|
||||||
|
<filename>/etc/XF86Config</filename>.</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><quote>Pointer</quote> Section for Wheeled
|
||||||
|
Mouse in XF86Config with moused
|
||||||
|
Translation</title>
|
||||||
|
|
||||||
|
<programlisting>Section "Pointer"
|
||||||
|
Protocol "SysMouse"
|
||||||
|
Device "/dev/sysmouse"
|
||||||
|
Buttons 5
|
||||||
|
EndSection
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Using Your X Server to Translate the Wheel
|
||||||
|
Events</para>
|
||||||
|
|
||||||
|
<para>If you aren't running &man.moused.8;, or if
|
||||||
|
you don't want &man.moused.8; to translate your
|
||||||
|
wheel events, you can have the X server do the
|
||||||
|
event translation instead. This requires a couple
|
||||||
|
of modifications to your
|
||||||
|
<filename>/etc/XF86Config</filename> file. First,
|
||||||
|
you need to choose the proper protocol for your
|
||||||
|
mouse. Most wheeled mice use the
|
||||||
|
<quote>IntelliMouse</quote> protocol. However,
|
||||||
|
XFree86 does support other protocols, such as
|
||||||
|
<quote>MouseManPlusPS/2</quote> for the Logitech
|
||||||
|
MouseMan+ mice. Once you have chosen the protocol
|
||||||
|
you will use, you need to add a
|
||||||
|
<varname>Protocol</varname> line to the
|
||||||
|
<quote>Pointer</quote> section.</para>
|
||||||
|
|
||||||
|
<para>Secondly, you need to tell the X server to
|
||||||
|
remap wheel scroll events to mouse buttons 4 and
|
||||||
|
5. This is done with the
|
||||||
|
<varname>ZAxisMapping</varname> option.</para>
|
||||||
|
|
||||||
|
<para>For example, if you aren't using
|
||||||
|
&man.moused.8;, and you have an IntelliMouse
|
||||||
|
attached to the PS/2 mouse port you would use
|
||||||
|
the following in
|
||||||
|
<filename>/etc/XF86Config</filename>.</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><quote>Pointer</quote> Section for Wheeled
|
||||||
|
Mouse in <filename>XF86Config</filename> with X
|
||||||
|
Server Translation</title>
|
||||||
|
|
||||||
|
<programlisting>Section "Pointer"
|
||||||
|
Protocol "IntelliMouse"
|
||||||
|
Device "/dev/psm0"
|
||||||
|
ZAxisMapping 4 5
|
||||||
|
EndSection
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Install <application>imwheel</application></para>
|
||||||
|
|
||||||
|
<para>Next, install <application>imwheel</application>
|
||||||
|
from the Ports collection. It can be found in the
|
||||||
|
<filename>x11</filename> category. This program will
|
||||||
|
map the wheel events from your mouse into keyboard
|
||||||
|
events. For example, it might send <keycap>Page
|
||||||
|
Up</keycap> to a program when you scroll the wheel
|
||||||
|
forwards. <application>Imwheel</application> uses a
|
||||||
|
configuration file to map the wheel events to
|
||||||
|
keypresses so that it can send different keys to
|
||||||
|
different applications. The default
|
||||||
|
<application>imwheel</application> configuration file
|
||||||
|
is installed in
|
||||||
|
<filename>/usr/X11R6/etc/imwheelrc</filename>. You
|
||||||
|
can copy it to <filename>~/.imwheelrc</filename> and
|
||||||
|
then edit it if you wish to customize
|
||||||
|
<application>imwheel</application>'s configuration.
|
||||||
|
The format of the configuration file is documented in
|
||||||
|
&man.imwheel.1;.</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Configure <application>Emacs</application> to Work
|
||||||
|
with <application>Imwheel</application>
|
||||||
|
(<emphasis>optional</emphasis>)</para>
|
||||||
|
|
||||||
|
<para>If you use <application>emacs</application> or
|
||||||
|
<application>Xemacs</application>, then you need to
|
||||||
|
add a small section to your
|
||||||
|
<filename>~/.emacs</filename> file. For
|
||||||
|
<application>emacs</application>, add the
|
||||||
|
following:</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><application>Emacs</application> Configuration
|
||||||
|
for <application>Imwheel</application></title>
|
||||||
|
|
||||||
|
<programlisting>;;; For imwheel
|
||||||
|
(setq imwheel-scroll-interval 3)
|
||||||
|
(defun imwheel-scroll-down-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-down imwheel-scroll-interval))
|
||||||
|
(defun imwheel-scroll-up-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-up imwheel-scroll-interval))
|
||||||
|
(global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines)
|
||||||
|
(global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines)
|
||||||
|
;;; end imwheel section
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<para>For <application>Xemacs</application>, add the
|
||||||
|
following to your <filename>~/.emacs</filename> file
|
||||||
|
instead:</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title><application>Xemacs</application> Configuration
|
||||||
|
for <application>Imwheel</application></title>
|
||||||
|
|
||||||
|
<programlisting>;;; For imwheel
|
||||||
|
(setq imwheel-scroll-interval 3)
|
||||||
|
(defun imwheel-scroll-down-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-down imwheel-scroll-interval))
|
||||||
|
(defun imwheel-scroll-up-some-lines ()
|
||||||
|
(interactive)
|
||||||
|
(scroll-up imwheel-scroll-interval))
|
||||||
|
(define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines)
|
||||||
|
(define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines)
|
||||||
|
;;; end imwheel section
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Run <application>Imwheel</application></para>
|
||||||
|
|
||||||
|
<para>You can just type <command>imwheel</command>
|
||||||
|
in an xterm to start it up once it is installed. It
|
||||||
|
will background itself and take effect immediately.
|
||||||
|
If you want to always use
|
||||||
|
<application>imwheel</application>, simply add it to
|
||||||
|
your <filename>.xinitrc</filename> or
|
||||||
|
<filename>.xsession</filename> file. You can safely
|
||||||
|
ignore any warnings <application>imwheel</application>
|
||||||
|
displays about PID files. Those warnings only apply
|
||||||
|
to the Linux version of
|
||||||
|
<application>imwheel</application>.</para>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||