XFree86은 모듈 형식으로 조이스틱, 터치스크린 등을 포함한 AceCad, Wacom 타블렛 드라이버를 제공하고 있다. 이들 드라이버는 Frederic Lepied가 만들었으며, Wacom 타블렛용 드라이버는 xf86Wacom.so 이다. 드라이버는 XFree86 설정 파일인 XF86Config에서 Module Section 을 통해 로딩하여 사용하게 된다.
XFree86에서 지원하는 Wacom 타블렛은 다음과 같다.
XFree86 드라이버는 /usr/X11R6/lib/modules에 있다.
truefeel:/usr/X11R6/lib/modules# ls -lF
total 1392
drwxr-xr-x 2 root root 4096 Apr 6 23:53 codeconv/
-rwxr-xr-x 1 root root 599867 Oct 12 1999 pex5.so*
-rwxr-xr-x 1 root root 18834 Oct 12 1999 xf86AceCad.so*
-rwxr-xr-x 1 root root 19313 Oct 12 1999 xf86Calcomp.so*
-rwxr-xr-x 1 root root 18185 Oct 12 1999 xf86Dial.so*
-rwxr-xr-x 1 root root 14032 Oct 12 1999 xf86Dyna.so*
-rwxr-xr-x 1 root root 19546 Oct 12 1999 xf86Elo.so*
-rwxr-xr-x 1 root root 14689 Oct 12 1999 xf86Jstk.so*
-rwxr-xr-x 1 root root 20652 Oct 12 1999 xf86MuTouch.so*
-rwxr-xr-x 1 root root 19642 Oct 12 1999 xf86Summa.so*
-rwxr-xr-x 1 root root 33957 Oct 12 1999 xf86Wacom.so*
-rwxr-xr-x 1 root root 602169 Oct 12 1999 xie.so*
위와 같이 Wacom 타블렛, AceCad 타블렛, SummaSketch 타블렛 등의 타블렛과 조이스틱, Elographics 터치스크린, MicroTouch 터치스크린을 XFree86에서는 지원한다.
Wacom 타블렛을 사용하기 위한 XF86Config 설정 예를 보자. XF86Config은 /etc, /etc/X11 또는 /usr/X11R6/lib/X11 디렉토리에 있다.
# 모듈 경로 지정(모듈이 /usr/X11R6/lib/Modules 이외의 디렉토리에 있을 때 지정)
#
Section "Files"
ModulePath "/usr/X11R6/lib/modules"
EndSection
# Wacom 타블렛 모듈 로딩
#
Section "Module"
Load "xf86Wacom.so"
EndSection
# Xinput 섹션 설정
#
Section "Xinput"
# WacomStylus 서브섹션 설정
#
# 1. 절대 모드(Wacom)
# 2. 상대 모드(WacomRv)
# 3. 절대 모드, AlwaysCore(WacomCore)
#
SubSection "WacomStylus"
Port "/dev/ttyS0"
DeviceName "Wacom"
Mode Absolute
Suppress 6
EndSubSection
SubSection "WacomStylus"
Port "/dev/ttyS0"
DeviceName "WacomRv"
Mode Relative
EndSubSection
SubSection "WacomStylus"
Port "/dev/ttyS0"
DeviceName "WacomCore"
Mode Absolute
TiltMode
AlwaysCore
EndSubSection
# WacomEraser 서브섹션 설정
#
# 1. 절대모드(Eraser)
# 2. 절대모드, AlwaysCore(EraserCore)
#
SubSection "WacomEraser"
Port "/dev/ttyS0"
Mode Absolute
EndSubSection
SubSection "WacomEraser"
Port "/dev/ttyS0"
DeviceName "EraserCore"
Mode Absolute
AlwaysCore
EndSubSection
# WacomCursor 서브섹션 설정
#
SubSection "WacomCursor"
Port "/dev/ttyS0"
EndSubSection
EndSection
Wacom 타블렛 같은 확장 입력장치의 환경설정은 XInput Section에서 한다. Wacom 타블렛 관련 SubSection은 3가지가 있다.
3가지 SubSection에서 사용하는 옵션은 다음과 같다.
타블렛이 연결된 시리얼 포트명을 지정한다. /dev/ttyS0은 COM1 포트이다.
디바이스명을 지정한다. 이 디바이스명은 X Input 장치를 선택할 때 등 프로그램 에서 사용하게 된다. 지정하지 않으면 디바이스 유형(Stylus, Eraser, Cursor) 이 디폴트로 지정된다.
절대 좌표 또는 상대 좌표로 사용할 것인지 디바이스 모드를 지정한다. 이 모드는 X-window 사용 중에 xsetmode 로 변경할 수 있다.
포인터(마우스, Stylus, Eraser, 등)를 공유할 수 있도록 한다. 즉, 2개 이상의 포인터를 동시에 사용할 수 있다. 마우스와 타블렛을 동시에 사용하고 싶다면 반드시 지정하기 바란다. AlwaysCore를 지정한 SubSection의 장치와 마우스는 동시에 사용하게 된다.
동작에 대한 버퍼 크기를 지정한다. 디폴트는 0이다.
상단 왼쪽 끝의 X 좌표를 지정한다.
상단 왼쪽 끝의 Y 좌표를 지정한다.
하단 오른쪽 끝의 X 좌표를 지정한다.
하단 오른쪽 끝의 Y 좌표를 지정한다.
디버깅 정보의 레벨을 0에서 10까지 지정한다. 숫자가 높을수록 자세하게 로깅한다.
사용하고 있는 타블렛 시리즈가 기울기를 지원할 경우 이 옵션을 지정하면 기울기를 사용할 수 있다. 타블렛의 ROM 버전은 1.4 이상이어야 한다. 이 버전은 XFree86 실행할 때 확인할 수 있다.
자 이제 앞에서 소개한 XF86Config 설정을 이해했는가? 위의 설정을 보면,
설정이 다 끝났다면 X-window를 실행해보자. 아 타블렛을 먼저 켠 상태에서 X-window을 실행하기 바란다. 그렇지 않으면 타블렛을 사용할 수 없음은 물론이고 X-window 첫 화면을 보기 위해 많은 인내심(?)과 지루함을 달랠만한 뭔가가 있어야 할 것이다.
truefeel:~# startx
...
(**) Adding extended device "SWITCH" (type: Switch)
(**) Adding extended device "Wacom" (type: Wacom Stylus)
(**) Adding extended device "WacomRv" (type: Wacom Stylus)
(**) Adding extended device "WacomCore" (type: Wacom Stylus)
(**) Adding extended device "STYLUS" (type: Wacom Stylus)
(**) Adding extended device "ERASER" (type: Wacom Eraser)
(**) Adding extended device "EraserCore" (type: Wacom Eraser)
(**) Adding extended device "CURSOR" (type: Wacom Cursor)
(--) Wacom tablet model : UD-0608-R00 V1.4-2
(--) Wacom IV tablet maximum X=10240 maximum Y=7680 X resolution=1270
Y resolution=1270 suppress=6 Tilt
(--) Wacom tablet top X=0 top Y=0 bottom X=10240 bottom Y=7680
(--) Wacom tablet top X=0 top Y=0 bottom X=10240 bottom Y=7680
(--) Wacom tablet top X=0 top Y=0 bottom X=10240 bottom Y=7680
(--) Wacom tablet top X=0 top Y=0 bottom X=10240 bottom Y=7680
(--) Wacom tablet top X=0 top Y=0 bottom X=10240 bottom Y=7680
(--) Wacom tablet top X=0 top Y=0 bottom X=10240 bottom Y=7680
정상적으로 실행되면 X-window 실행할 때 위의 메시지를 볼 수 있다. (**) Adding
부분은 Wacom 타블렛의 확장 장치명이며, 그 다음 줄에 UD-0608-R00
모델명을 볼 수 있다. V1.4-2
은 뭘까? 바로 타블렛의 ROM 버전이다. 이 버전은 TileMode 를 사용가능한지 결정하는 중요한 요소이므로 잘 봐두기 바란다.