<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >Using XFree with event interface support</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="XFree Local Multi-User HOWTO" HREF="index.html"><LINK REL="UP" TITLE="More on configuring input devices" HREF="tweak_input_devs.html"><LINK REL="PREVIOUS" TITLE="Using hotplug with input.agent and input.rc" HREF="tweak_input_devs-inputagent1.html"><LINK REL="NEXT" TITLE="Using the Phys descriptor and USB devices" HREF="tweak_input_devs-phys.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >XFree Local Multi-User HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="tweak_input_devs-inputagent1.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 5. More on configuring input devices</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="tweak_input_devs-phys.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="tweak_input_devs-Xev1" ></A >5.3. Using XFree with event interface support</H1 ><P >This will allow you:</P ><P ></P ><UL ><LI ><P >if you have input devices with different names, to use them with the same Xserver/screen wherever you plug or re-plug them. </P ></LI ><LI ><P >if you have input devices with the same names, to use them with the same Xserver/screen according to the USB port where you plug or re-plug them. </P ></LI ><LI ><P > the ability to use wild cards such as <SPAN CLASS="QUOTE" >"*"</SPAN > and <SPAN CLASS="QUOTE" >"?"</SPAN >.</P ></LI ></UL ><DIV CLASS="caution" ><P ></P ><TABLE CLASS="caution" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/caution.gif" HSPACE="5" ALT="Caution"></TD ><TH ALIGN="LEFT" VALIGN="CENTER" ><B >Caution</B ></TH ></TR ><TR ><TD > </TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Currently hot-plugging doesn't seems to work properly. I have reports that it works when using the <SPAN CLASS="QUOTE" >"Dev Name"</SPAN > option, but my primary purpose was to get it working with <SPAN CLASS="QUOTE" >"Dev Phys"</SPAN > and this does not currently seem to work. <SPAN CLASS="QUOTE" >"Why "Dev Phys"?"</SPAN > - because if one wants to setup a single system for 4,5 or more users it would be easier to get 4,5 or more pieces of the same keyboard/ mouse then to find the same number keyboards or mice but from different manufacturer or with different names, and i find configuring XFree for such number users is simpler when <SPAN CLASS="QUOTE" >"Dev Phys"</SPAN > is used.</P ></TD ></TR ></TABLE ></DIV ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/warning.gif" HSPACE="5" ALT="Warning"></TD ><TH ALIGN="LEFT" VALIGN="CENTER" ><B >Warning</B ></TH ></TR ><TR ><TD > </TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >This section is somewhat abandoned and is not tested under Ruby-2.6 as it didn't work reliably for me.</P ></TD ></TR ></TABLE ></DIV ><P >For this to work you will have to use XFree with the patches for event interface support, developed by Zephaniah Hull. You can find them at the following url: <A HREF="http://people.debian.org/~warp/evdev/" TARGET="_top" >http://people.debian.org/~warp/evdev/</A >.</P ><P >To build from source you will need the following patches :</P ><P ></P ><UL ><LI ><P ><TT CLASS="filename" >029_lnx_evdev.diff</TT > : The evdev core patch.</P ></LI ><LI ><P ><TT CLASS="filename" >030_lnx_evdev_mouse.diff</TT > : The mouse side of the patch.</P ></LI ><LI ><P ><TT CLASS="filename" >031_lnx_evdev_keyboard.diff</TT > : The keyboard side of the patch.</P ></LI ></UL ><P >The binaries for Debian include these patches.</P ><P >For hot-plugging you will also need the <TT CLASS="filename" >/etc/hotplug/input.agent</TT > , which you can find under the above address and in Appendix Scripts </P ><P >Then you have to configure XFree to use the event devices.</P ><P >The configuration section for a mouse should look something like this:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" >Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "evdev" Option "Dev Name" "A4Tech USB Optical Mouse" Option "Dev Phys" "usb-*/input0" Option "Buttons" "9" Option "ZAxisMapping" "6 7 8 9" EndSection</PRE ></FONT ></TD ></TR ></TABLE ><P >The configuration section for a keyboard should look something like this:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" >Section "InputDevice" Identifier "Keyboard1" Driver "kbd" Option "Protocol" "evdev" Option "Dev Name" "SILITEK USB Keyboard" Option "Dev Phys" "usb-*/input0" Option "AutoRepeat" "250 30" Option "XkbRules" "xfree86" Option "XkbModel" "pc101" Option "XkbLayout" "dvorak" EndSection</PRE ></FONT ></TD ></TR ></TABLE ><P >For Dev Name and Dev Phys, the wildcats <SPAN CLASS="QUOTE" >"?"</SPAN > and <SPAN CLASS="QUOTE" >"*"</SPAN > work, you MUST have at least one of the two, if you have both then the device must match on both, a non-existent entry is the same as one consisting of <SPAN CLASS="QUOTE" >"*"</SPAN >.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="tweak_input_devs-inputagent1.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="tweak_input_devs-phys.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Using hotplug with <TT CLASS="filename" >input.agent</TT > and <TT CLASS="filename" >input.rc</TT ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="tweak_input_devs.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Using the <SPAN CLASS="QUOTE" >"Phys"</SPAN > descriptor and USB devices</TD ></TR ></TABLE ></DIV ></BODY ></HTML >