Linux Touch Screen HOWTOChristoph Baumann, cgb@debian.orgOct 24, 2000ÀÌÈ£¿¬ guru2k@kldp.orgÀÌ ¹®¼´Â XFree86¿¡¼ ÅÍÄ¡ ½ºÅ©¸° ÀÔ·Â ÀåÄ¡¸¦ ¾î¶»°Ô ¼³Á¤ÇÏ´ÂÁö ±â¼úÇÑ ´Ù. ÀúÀÚ´Â ¿ÀÁ÷ EloTouch(R) ¿Í MicroTouch(R) ÀåÄ¡¸¸ »ç¿ëÇÒ ±âȸ°¡ ÀÖ¾î¼ ÀÌ ÇÏ¿ìÅõ´Â ¿ÀÈ÷·Á ÀÏÁ¤ÇÑ ÀÌ ÀåÄ¡µéÀ» À§ÇÑ °ÍÀÌ´Ù. 1. ¾î´À Á¾·ùÀÇ ÀåÄ¡µéÀÌ ¿©±â¿¡ ±â¼úÇÏ°Ô µÇ´À³Ä?ÀÌ ÇÏ¿ìÅõ´Â ½Ã¸®¾ó Æ÷Æ®(/dev/ttyS0 ȤÀº /dev/ttyS1)¸¦ ÅëÇØ ¿¬°áµÈ ÀåÄ¡ µé¿¡ Àü³äÇÑ´Ù. 2. ±× ÀåÄ¡¸¦ ¼³Á¤ÇÏ´Â ¹æ¹ýÅÍÄ¡ ½ºÅ©¸° ÀåÄ¡´Â XF86Config ÆÄÀÏ (´ëºÎºÐ /etc/X11/XF86Config ȤÀº /etc/XF86Config) ÀÇ Xinput ºÎºÐ¿¡ ¼³Á¤µÇ¾ú´Ù. ¸ÇóÀ½¿¡ ÀåÄ¡ µå¶óÀ̹ö ¸ðµâÀÌ Á¸ÀçÇÏ´ÂÁö¸¦ È®ÀÎÇ϶ó. ±×°ÍµéÀº /usr/X11R6/lib/modules/¿¡ ÀÖ´Ù (¹«¾ùº¸´Ùµµ xf86Elo.so ¿Í xf86MuTouch.so ÀåÄ¡¿¡ ´ëÇØ ¾ð±ÞÇÑ ¸ðµâ). Áö±Ý XF86Config¸¦ º¸¶ó. °Å±â´Â ÀÌ°Í°ú °°ÀÌ º¸ÀÌ´Â ºÎºÐÀÌ ÀÖ¾î¾ß ÇÑ´Ù:
Section "Files" ... ModulePath "/usr/X11R6/lib/modules" ... EndSection X ¼¹ö¿¡ ÀÇÇØ ÀûÀçµÇ´Â ¸ðµâÀ» ¾òÀ¸·Á¸é ÀÌ °Í°ú °°Àº ºÎºÐÀÌ °Å±â¿¡ ÀÖ¾î ¾ß ÇÑ´Ù:
Section "Module" Load "xf86Elo.so" EndSection Áö±Ý ´õ º¹ÀâÇÑ ºÎºÐÀÌ ÀÖ´Ù. X´Â ÀåÄ¡¿¡ °üÇÑ ¸î¸î ¸Å°³ º¯¼ö¸¦ ÇÊ¿ä·Î ÇÑ ´Ù. ÀÌ °Í°ú °°ÀÌ º¸ÀÌ´Â ÀÌ°ÍÀ» À§ÇÑ ºÎºÐ ("man XF86Config"ÀÇ ´õ¸¹Àº Ç׸ñ À» º¸¶ó):
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 ±× Çϵå¿þ¾îÀÇ ¼³Á¤À» À§ÇÑ µ¶Æ¯ÇÑ °úÁ¤ÀÎ MinimumXPosition, ±âŸ ÀÔ·ÂÀ» Ç϶ó (ÅÍÄ¡ ½ºÅ©¸°°ú °ü°è°¡ ÀÖ´Â ¸ð´ÏÅÍÀÇ Àå¼Ò¿¡ ´Þ·ÁÀÖ´Ù). ±× °ªÀº ´ç½Å ÀÇ ¸ð´ÏÅÍ (xmax¿Í ymax´Â X¼¹öÀÇ ¼±ÅÃµÈ Çػ󵵿¡ ´Þ·ÁÀÖ´Ù, 1024x768 °°Àº) ÀÇ Á¡ (0,0) ¿Í (xmax,yman) ÀÌ ´ç½ÅÀÇ ÅÍÄ¡ ½ºÅ©¸°¿¡ ±â·ÏÇÏ´Â °ÍÀ» °áÁ¤ÇÑ ´Ù. ±× ÀåÄ¡ µå¶óÀ̹ö´Â ÀÌ °ªµéÀ» ÀÐ°í ´Ù¸¥ ÁÂÇ¥¸¦ ½á ³Ö´Â´Ù. ¼³¸í:
--------------touch screen area----------------- I I I ########visible monitor area############## 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 ------------------------------------------------ ÀÌ ±â·ÏÇϱâ´Â ½ÃÇè°ú ¿¡·¯ ȤÀº ÀåÄ¡ÀÇ ¹Ì¼÷ÇÑ Ãâ·Â Àб⿡ ÀÇÇØ ³¡³¯¼ö ÀÖ´Ù (¸î¸î ½Ã¸®¾ó Æ÷Æ® ÇÁ·Î±×·¡¹ÖÀÌ ÇÊ¿äÇÏ´Ù, "The Linux Serial Programming HOWTO" ¸¦ º¸¶ó). Eletouch¿Í MicroTouch ±Ùº»ÀÇ °ËÁ¤ µµ±¸°¡ Á¸Àç ÇÑ´Ù (ÀÌ ¹®¼ÀÇ ÀúÀÚ¿¡ ÀÇÇØ ¾²¿©Á³°í, ftp://metalab.unc.edu/pub/linux/X11/xutils/touchcal-0.1.tar.gz) ¿¡¼ ãÀ» ¼ö ÀÖ´Ù). 3. ÀåÄ¡ ÀÛµ¿½ÃÅ°±âX¸¦ ½ÃÀÛÇÑ ÈÄ¿¡, ¿¢½ºÅ͹̳ο¡¼ ±× ¸í·É¾î¸¦ ÃĶó
ÀåÄ¡¸¦ ½ÃÀÛÇÒ¶§¸¶´Ù ÀÛµ¿ ½ÃÅ°·Á¸é ÅÍÄ¡ ½ºÅ©¸°ÀÇ AlwaysCore¸¦ ¼±ÅÃÇضó. 4. ÅÍÄ¡ ½ºÅ©¸°°ú Æз¯·² ¸¶¿ì½º »ç¿ëÇϱâÅÍÄ¡ ½ºÅ©¸°°ú Æз¯·· ¸¶¿ì½º¸¦ »ç¿ëÇÏ·Á¸é Xinput-sectionÀÇ mouse specs¸¦ µî·Ï ½ÃÄÑ¾ß ÇÑ´Ù. ÀÌ Á¤ÀÇ´Â Pointer-section ¿¡µµ °°ÀÌ ÀÖ¾î¾ß ÇÑ´Ù. ¾Æ·¡¿¡ PS/2-mouseÀÇ ¿¹°¡ ÀÖ´Ù: Section "Xinput" SubSection "Mouse" Protocol "PS/2" Port "/dev/mouse" #could also be /dev/psaux DeviceName "Mouse" AlwaysCore EndSubSection ... EndSection¸î¸î »ç¶÷µéÀº ÀÌ °ÍÀ» ÁÖ¸ñÇÏ°Ô ÇÑ´Ù. ƯÈ÷ AlwaysCore ¿É¼ÇÀÇ °ü½À. ±× µé ¸ðµÎ¿¡°Ô °¨»çÇÑ´Ù. 5. ÀÐÀ»°Å¸® Á¦¾È
|
Of all forms of caution, caution in love is the most fatal. |