\documentclass[letterpaper,english]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{Linux Touch Screen HOWTO}
\author{×÷Õß: Christoph Baumann, {\ttfamily cgb@debian.org}\\ 
ÒëÕß: ³ÂÃô½£ {\ttfamily expns@yahoo.com}}
\date{v3.0, 2002-07-06 }
\abstract{ÕâÆªHOWTOÃèÊöÈçºÎÔÚLinuxÉÏÊ¹ÓÃ´¥ÃþÆÁ.}


\begin{document}
\maketitle
\tableofcontents

\section{½éÉÜ}

Àý×Óµ±ÖÐµÄÉè¶¨Á¬½ÓÊÇÍ¨¹ý´®ÐÐ¿Úserial port ½øÐÐµÄ. ±ÈÈç:
/dev/ttyS0 »òÕß /dev/ttyS1. (»¶Ó­Ìá¹©USB devices µÄ×ÊÑ¶!)
The GNU Free Documentation License applies to this document.


\subsection{¹Øì¶×÷Õß}

×÷Õß Christoph Baumann ÔÚ¹¤×÷ÖÐÊ¹ÓÃ EloTouch(R) ºÍ MicroTouch(R)¹«Ë¾µÄ²úÆ·,
Õâ¸öHOWTO¾ÍÊÇÔ´×Ôì¶Ëû¶ÔÕâÐ©Éè±¸µÄ Ê¹ÓÃ/ÑÐ¾¿ µÄ¾­Ñé. 


\section{Éè¶¨device}

Touch screen µÄÉè¶¨ÊÇÍ¨¹ýXF86ConfigÎÄµµÖÐµÄXinput²¿·ÖÀ´Íê³É.
(Í¨³£ÊÇ /etc/X11/XF86Config »òÕßÊÇ /etc/XF86Config). 
Ê×ÏÈ¼ì²éÓ²ÌåµÄÇý¶¯Ä£×éÊÇ·ñ´æÔÚ.
ËüÃÇÓ¦¸ÃÔÚ /usr/X11R6/lib/modules/ (ÎÒÊ¹ÓÃµÄÄ£×éÊÇ xf86Elo.so ºÍ xf86MuTouch.so ,
ËüÃÇ·Ö±ðÊÇÁ½¸ö²»Í¬²úÉÌµÄÄ£×é).ÏÖÔÚ¿´Ò»ÏÂXF86Config,Ó¦ÓÐÒ»²¿·Ö¿´ÆðÀ´ÏñÕâÑù:
\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
Section "Files"
...
ModulePath "/usr/X11R6/lib/modules"
...
EndSection
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}


Èç¹ûÒª½«Ä£×é¹Ò½ø X server ,Ó¦ÓÐÒ»²¿·ÖÏñÕâÑù: 

\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}

Section "Module"
Load "xf86Elo.so"
EndSection
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}


ÏÖÔÚµ½ÁË×î¹Ø½¨µÄÊ±ºòÁË.
X ÐèÒªÉè±¸µÄÒ»Ð©²ÎÊý. 
Õâ²¿·Ö¿´ÆðÀ´ÏñÊÇÕâÑù(ÏëÁË½â¸ü¶àµÄÏ¸½ÚÇë²ÎÕÕ "man XF86Config" ): 

\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
Section "Xinput"
 SubSection "Elographics"  
#the entry for a MicroTouch device would be SubSection "MicrotouchFinger"
  Port "/dev/ttyS1" # for a device at serial port 2
  DeviceName "TouchScreen" #¿ÉÒÔËæÒâÉè¶¨Ãû³Æcould be any unambiguous name
  MinimumXPosition 300
  MaximumXPosition 3700
  MinimumYPosition 300
  MaximumYPosition 3700
  UntouchDelay 10 #not supported with MuTouch
  ReportDelay 10  #not supported with MuTouch
  AlwaysCore #activates the device on startup
 EndSubSection
EndSection
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}


MinimumXPosition µÈµÈÊÇÓ²ÌåµÄÏ¸½ÚÉè¶¨(
Éè¶¨touch screen ÔÚÏÔÊ¾Éè±¸ÉÏµÄÎ»ÖÃ). ÊýÖµ½«ÏÔÊ¾×ù±ê (0,0) ºÍ (xmax,ymax) Ó³Éäµ½ Touch screen Éè±¸ÉÏ(xmax ºÍ ymax È¡¾öì¶ Xserver
µÄÓ¨Ä»ÇøÓò, ±ÈÈç 1024x768).Í¼Àý:

\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
 --------------touch screen ÇøÓò-----------------
 I                                              I
 I  ########### Ó¨Ä»µÄ¿ÉÊÓÇøÓò ###############  I
 I  #x                                       #  I
 I  # (0,0)                                  #  I
 I  # (MinimumXPosition,MinimumYPosition)    #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #     (MaximumXPosition,MaximumYPosition)#  I
 I  #                             (xmax,ymax)#  I
 I  #                                       x#  I
 I  ##########################################  I
 I                                              I
 ------------------------------------------------
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}


Õâ¸öÓ³Éä¿ÉÒÔÍ¨¹ý·´¸²ÊÔÑé,»òÕß²ÎÕÕÓ²ÌåÊä³öµÄÊý¾ÝÍê³É (ÐèÒªÐ´Ò»Ð©ÔÚ serial port ·½ÃæµÄ³ÌÊ½programming, 
²ÎÕÕ: "The Linux Serial Programming HOWTO").
×÷ÕßÐ´ÁËÒ»¸öEloTouch ºÍ MicroTouch ²úÆ·µÄÐ£×¼³ÌÊ½, ¿ÉÔÚÕâÀïÏÂÔØ:

\onlynameurl{ ftp://metalab.unc.edu/pub/linux/X11/xutils/touchcal-0.1.tar.gz}


\section{¼¤»îÉè±¸}

½øÈë X, ÔÚÖÕ¶ËÉÏÊäÈë:
\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
xsetpointer < devicename> 
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}
 

$<$ devicename$>$ ÊÇXF86Config Éè¶¨ÎÄµµÖÐµÄDeviceName ".....", Õâ¸öÀý×ÓÖÐËüÊÇ TouchScreen. 
ÔÚtouch screen section (see above) Éè¶¨ AlwaysCore ÈÃËü×Ô¶¯¼¤»î.




\section{Ê¹ touch screen ºÍ»¬ÊóÍ¬²½}

 Ê¹ touch screen ºÍ»¬ÊóÍ¬²½
ÄãÐèÒª½«»¬ÊóµÄÉè¶¨¼ÓÈëXinput-section. Õâ¸öÉè¶¨ºÍPointer-section²î²»¶à. 
The following example is for a PS/2-mouse: 
\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
Section "Xinput" 
   SubSection "Mouse" 
      Protocol "PS/2" 
      Port "/dev/mouse" #could also be /dev/psaux 
      DeviceName "Mouse" 
      AlwaysCore 
   EndSubSection
...
EndSection 
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}


Ðí¶àÈËÌá³öÁË½¨Òé,ÓÈÆäÊÇ AlwaysCore µÄÓÃ·¨.ÎÒ¸ÐÐ»ËûÃÇ!!




\section{ÔÚ XFree86 4 Ö®ÏÂ½øÐÐÉè¶¨}

(from Lee Monamy) 
ELO touch screen µÄXF86Config-4Éè¶¨:

\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
Section "InputDevice"
        Identifier "ELO touchscreen"
        Driver "elographics"
        Option  "Device"        "/dev/ttyS0"
        Option  "MinimumXPosition"      "300"
        Option  "MaximumXPosition"      "3700"
        Option  "MinimumYPosition"      "300"
        Option  "MaximumYPosition"      "3700"
        Option  "UntouchDelay"  "10"
        Option  "ReportDelay"   "10"
        Option  "SendCoreEvents"        "yes"
EndSection
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}


ÖµµÃ×¢ÒâµÄÊÇÕâ¸öÉè¶¨ºÍ version 3 Éè¶¨DeviceµÄ²»Í¬,
*not* a Port, otherwise you get an error.Í¬Ñù version3 µÄ AlwaysCore  ±» SendCoreEvents È¡´ú. 

ÄãÒ²Òª¼ÓÈëµ½ServerLayout,²»ÓÃ¹ÜXµÄÐÅÏ¢: "(II) XINPUT: Adding extended input device "TOUCHSCREEN" (type: Elographics Touch Screen)"
\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
Section "ServerLayout"
        Identifier      "Default Layout"
        Screen  "Default Screen"
        InputDevice "Generic Keyboard"
...
        InputDevice "ELO touchscreen"
EndSection
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
 
\end{tscreen}





\subsection{ÆäËüµÄÀý×Ó}


\subsubsection{from Dirk Mueller (for Microtouch SMT3 Series): }

\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
Section "InputDevice"
        Identifier  "MicroTouchFinger"
        Driver      "mutouch"
        Option      "Type" "finger"
        Option      "Device" "/dev/ttyS0"
        Option      "ScreenNo" "0"
        Option      "MinimumXPosition" "0"
        Option      "MaximumXPosition" "16383"
        Option      "MinimumYPosition" "0"
        Option      "MaximumYPosition" "16383"
EndSection
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
 
\end{tscreen}


Option "Type" ¿ÉÒÔÊÇ "finger" »ò "stylus" Since Microtouch was bought by 3M-Touch,
²ÎÕÕ \onlynameurl{ http://www.3M.com/3MTouchSystems/downloads/legacy.jhtml\#Linux}


\subsection{¸½Â¼}

ÒÀ¾Ý Wong Yeow Sen, Éè¶¨µÄ option Ãû×ÖÔÚ XFree86 4.2 (at least with Red Hat 7.3)ÓÐËù¸Ä±ä. 
Èç¹ûÄãµÄÐ£×¼ÓÐÎó²îÇëÊÔÊÔÕâ¸ö: 
\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
...
        Option  "MinX"      "100"
        Option  "MaxX"      "4000"
        Option  "MinY"      "100"
        Option  "MaxY"      "4000"
...
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
 
\end{tscreen}





\section{Touch Screens on Fujitsu LifeBooks}

(ÓÉ Joerg Hau Ìá¹©) 

¿ÉÒÔÔÚÏÂÃæÕÒµ½ÄãÒªµÄ×ÊÑ¶:
Harald Hoyer's Linux Touch Panel Drivers for the Fujitsu Lifebooks B112/B142/B2130,
\onlynameurl{http://parzelle.de/Linux/Lifebook/}.
²»ÐÒµÄÊÇ, ËüÖ»Õë¶ÔXFree 3.x ²¢ÇÒÃ»ÓÐ¸üÐÂ (dead?). 



Kenan Esau's Lifebook Series B Touchscreen driver, which is the adaptation of Harald's driver to XFree 4.x. 
\onlynameurl{http://stlx01.stz-softwaretechnik.de/\~{}ke/lifebook/lifebook.html}. 

 ÎÒÔÚFujitsu LifeBook B142ÉÏ Ê¹ÓÃ Kenan's µÄÇý¶¯³ÌÊ½(
\onlynameurl{http://www.mysunrise.ch/users/joerg.hau/linux/b142.htm} ),
and it works like a charm.


\section{½¨ÒéÔÄ¶Á}

\begin{itemize}
\item XF86Config µÄ Manpage 
\item         \onlynameurl{http://www.elotouch.com/Support/linux.asp }
\item         \onlynameurl{http://www.microtouch.com/mthtml/05a1\_drivers.htm}
\item         \onlynameurl{http://www.hof-berlin.de/tablet/tablet.html}
(¸ÐÐ»Christer Olofsson ½«Õâ¸ö URL ¼Ä¸øÎÒ) 
\item Äã×Ô¼ºµÄ touch screen ÊÖ²á :-) 
\end{itemize}


\end{document}
