로그인
Sign in
조회 수 5 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
RPM Filename x11-touchscreen-calibrator-0.2-1no1linux.2020.x86_64.rpm
Category KDE
SRPM x11-touchscreen-calibrator-0.2-1no1linux.2020.src.rpm
Note x11-touchscreen-calibrator

X Window System’s Touchscreen Calibrator

터치스크린 시스템에서 이 도구를 실행하면 해상도가 변경될 때 즉 화면이 회전될때(해상도가 달라지므로) 그에 상응하는 Coordinate transformation matrix 값을 측정해서 알려 줍니다. 이렇게 측정된 Coordinate transformation matrix 값을 xinput로 수정해 주면 터치스크린의 회전 방향을 올바르게 설정할 수 있습니다.

x11-touchscreen-calibrator

X Window System’s Touchscreen Calibrator

X11 Touchscreen Calibrator runs as a daemon in the background. It will detect the touchscreen automatically and adjust the corresponding Coordinate Transformation Matrix of Touchscreen xinput when the resolution is changed. It should also support rotation, reflection and different scaling modes of display output.


Coordinate Transformation Matrix

Zoom

Restrict the cursor movement within the left half side of the touchscreen display.

⎡ 0.5 , 0 , 0 ⎤
⎜ 0   , 1 , 0 ⎥
⎣ 0   , 0 , 1 ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 0.5 0 0 0 1 0 0 0 1

Restrict the cursor movement within the top half side of the touchscreen display.

⎡ 1 , 0   , 0 ⎤
⎜ 0 , 0.5 , 0 ⎥
⎣ 0 , 0   , 1 ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 1 0 0 0 0.5 0 0 0 1

Map the cursor movement to the left half touchscreen area.

⎡ 2 , 0 , 0 ⎤
⎜ 0 , 1 , 0 ⎥
⎣ 0 , 0 , 1 ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 2 0 0 0 1 0 0 0 1

Map the cursor movement to the top half touchscreen area.

⎡ 1 , 0 , 0 ⎤
⎜ 0 , 2 , 0 ⎥
⎣ 0 , 0 , 1 ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 1 0 0 0 2 0 0 0 1

Translation

Make the cursor shift right by half the width of the touchscreen.

⎡ 1 ,  0 ,  0.5 ⎤
⎜ 0 ,  1 ,  0   ⎥
⎣ 0 ,  0 ,  1   ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 1 0 0.5 0 1 0 0 0 1

Make the cursor shift left by half the width of the touchscreen.

⎡ 1 ,  0 ,  -0.5 ⎤
⎜ 0 ,  1 ,   0   ⎥
⎣ 0 ,  0 ,   1   ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 1 0 -0.5 0 1 0 0 0 1

Make the cursor shift down by half the height of the touchscreen.

⎡ 1 ,  0 ,  0   ⎤
⎜ 0 ,  1 ,  0.5 ⎥
⎣ 0 ,  0 ,  1   ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 1 0 0 0 1 0.5 0 0 1

Make the cursor shift up by half the height of the touchscreen.

⎡ 1 ,  0 ,   0   ⎤
⎜ 0 ,  1 ,  -0.5 ⎥
⎣ 0 ,  0 ,   1   ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 1 0 0 0 1 -0.5 0 0 1

Zoom x Translation

For example, if we want the center 1/4 area of the touchscreen to operate the fullscreen cursor movement.

⎡ 2 , 0 , 0 ⎤   ⎡ 1 , 0 , 0 ⎤   ⎡ 1 ,  0 ,  -0.25 ⎤   ⎡ 1 ,  0 ,   0    ⎤
⎜ 0 , 1 , 0 ⎥ X ⎜ 0 , 2 , 0 ⎥ X ⎜ 0 ,  1 ,   0    ⎥ X ⎜ 0 ,  1 ,  -0.25 ⎥
⎣ 0 , 0 , 1 ⎦   ⎣ 0 , 0 , 1 ⎦   ⎣ 0 ,  0 ,   1    ⎦   ⎣ 0 ,  0 ,   1    ⎦

equals to

⎡ 2 , 0 , 0 ⎤   ⎡ 1 ,  0 ,  -0.25 ⎤
⎜ 0 , 2 , 0 ⎥ X ⎜ 0 ,  1 ,  -0.25 ⎥
⎣ 0 , 0 , 1 ⎦   ⎣ 0 ,  0 ,   1    ⎦

equals to

⎡ 2 , 0 , -0.5 ⎤
⎜ 0 , 2 , -0.5 ⎥
⎣ 0 , 0 ,  1   ⎦

$ xinput set-prop ‘<device name>’ ‘Coordinate Transformation Matrix’ 2 0 -0.5 0 2 -0.5 0 0 1

Scaling mode

The touchscreen display may support four different modes, such as ‘None’, ‘Full’, ‘Center’ and ‘Full aspect’.

pw = preferred width
ph = preferred height
(The preferred resolution of touchscreen display.)

sw = screen width
sh = screen height
(The virtual screen of X Window System.)

dw = display width
dh = display height
dx = display X axis
dy = display Y axis
(The actual resolution and position of touchscreen display.)

‘None’ mode

The behavior is undefined. It may work like ‘Full’ mode or ‘Center’ mode.

‘Full’ mode

⎡ dw / sw ,  0       ,  dx / sw ⎤
⎜ 0       ,  dh / sh ,  dy / sh ⎥
⎣ 0       ,  0       ,  1       ⎦

equals to

⎡ 1 ,  0 ,  dx / sw ⎤   ⎡ dw / sw , 0       , 0 ⎤
⎜ 0 ,  1 ,  dy / sh ⎥ X ⎜ 0       , dh / sh , 0 ⎥
⎣ 0 ,  0 ,  1       ⎦   ⎣ 0       , 0       , 1 ⎦

‘Center’ mode

⎡ pw / dw ,  0       ,  (dw - pw) / sw / 2 + dx / sw ⎤
⎜ 0       ,  ph / sh ,  (dh - ph) / sh / 2 + dy / sh ⎥
⎣ 0       ,  0       ,  1                            ⎦

equals to

⎡ dw / sw ,  0       ,  dx / sw ⎤   ⎡ pw / dw , 0       , (dw - pw) / dw / 2 ⎤
⎜ 0       ,  dh / sh ,  dy / sh ⎥ X ⎜ 0       , ph / dh , (dh - ph) / dh / 2 ⎥
⎣ 0       ,  0       ,  1       ⎦   ⎣ 0       , 0       , 1                  ⎦

equals to

⎡ dw / sw ,  0       ,  dx / sw ⎤   ⎡ pw / dw , 0       , 0 ⎤   ⎡ 1 , 0 , - (1 - dw / pw) / 2 ⎤
⎜ 0       ,  dh / sh ,  dy / sh ⎥ X ⎜ 0       , ph / dh , 0 ⎥ X ⎜ 0 , 1 , - (1 - dh / ph) / 2 ⎥
⎣ 0       ,  0       ,  1       ⎦   ⎣ 0       , 0       , 1 ⎦   ⎣ 0 , 0 , 1                   ⎦

‘Full aspect’ mode

(with left and right side blank)

⎡ pw * dh / ph / sw ,  0       ,  (1 - pw * dh / ph / dw) * dw / sw / 2 + dx / sw ⎤
⎜ 0                 ,  dh / sh ,  dy / sh                                         ⎥
⎣ 0                 ,  0       ,  1                                               ⎦

equals to

⎡ dw / sw ,  0       ,  dx / sw ⎤   ⎡ pw * dh / ph / dw , 0 , (1 - pw * dh / ph / dw) / 2 ⎤
⎜ 0       ,  dh / sh ,  dy / sh ⎥ X ⎜ 0                 , 1 , 0                           ⎥
⎣ 0       ,  0       ,  1       ⎦   ⎣ 0                 , 0 , 1                           ⎦

equals to

⎡ dw / sw ,  0       ,  dx / sw ⎤   ⎡ pw * dh / ph / dw , 0 , 0 ⎤   ⎡ 1 , 0 , (ph * dw / pw / dh - 1) / 2 ⎤
⎜ 0       ,  dh / sh ,  dy / sh ⎥ X ⎜ 0                 , 1 , 0 ⎥ X ⎜ 0 , 1 , 0                           ⎥
⎣ 0       ,  0       ,  1       ⎦   ⎣ 0                 , 0 , 1 ⎦   ⎣ 0 , 0 , 1                           ⎦

Rotation

$ xrandr -o left

⎡ 0 -1 1 ⎤
⎜ 1  0 0 ⎥
⎣ 0  0 1 ⎦

$ xrandr -o right

⎡  0 1 0 ⎤
⎜ -1 0 1 ⎥
⎣  0 0 1 ⎦

$ xrandr -o inverted

⎡ -1  0 1 ⎤
⎜  0 -1 1 ⎥
⎣  0  0 1 ⎦

Reflection

$ xrandr -x

⎡ -1 0 1 ⎤
⎜  0 1 0 ⎥
⎣  0 0 1 ⎦

$ xrandr -y

⎡ 1  0 0 ⎤
⎜ 0 -1 1 ⎥
⎣ 0  0 1 ⎦

List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 No1.Linux RPM 패키징 현황 게시판 2 zharyong 2016.09.05 385
213 [No1.Linux2020/x86_64] kdeconnect-kde-master-3no1linux.2020 file No1Linuxer 2020.03.27 2
212 [No1.Linux2020/x86_64] kded_rotation-master-1no1linux.2020 file No1Linuxer 2020.03.27 2
211 [No1.Linux2020/noarch] conky_conf_wifi_1.0-1no1linux.2020 file No1Linuxer 2020.03.17 12
210 [No1.Linux2020/x86_64] discover-5.18.2-1no1linux.2020 file No1Linuxer 2020.03.10 15
209 [No1.Linux2020/noarch] firefox-te-1.0-2no1linux.2020 No1Linuxer 2020.03.07 4
208 [No1.Linux2020/noarch] libreoffice-te-1.0-2no1linux.2020 No1Linuxer 2020.03.07 5
207 [No1.Linux2020/noarch] libinput-gestures-2.48-1no1linux.2020 No1Linuxer 2020.03.07 11
» [No1.Linux2020/x86_64] x11-touchscreen-calibrator-0.2-1no1linux.2020 No1Linuxer 2020.03.07 5
205 [No1.Linux2020/x86_64] xf86-input-wacom-0.39.0-1no1linux.2020 No1Linuxer 2020.03.05 2
204 [No1.Linux2020/x86_64] nabi-1.0.0-8no1linux.2020 file No1Linuxer 2020.03.05 5
203 [No1.Linux2020/x86_64] qtvirtualkeyboard5-5.12.7-3no1linux.2020 file No1Linuxer 2020.03.05 12
202 [No1.Linux2020/x86_64] kernel-5.5.4-no1linux1-1-1no1linux.2020 No1Linuxer 2020.03.05 2
201 [No1.Linux2020/x86_64] drakxtools-17.20-15no1linux.2020 No1Linuxer 2020.03.05 3
200 [No1.Linux2020/x86_64] drakconf-13.4-8no1linux.2020 file No1Linuxer 2020.03.05 3
199 [No1.Linux2020/x86_64] azpainter-2.1.5-1no1linux.2020 file No1Linuxer 2020.03.05 4
198 [No1.Linux2020/noarch] rotatescreen-quanta-1.0-2no1linux.2020 No1Linuxer 2020.03.05 2
197 [No1.Linux2020/x86_64] lutris-0.5.4-2no1linux.2020 file No1Linuxer 2020.03.05 7
196 [No1.Linux2020/noarch] rotatescreen-atmel-maXTouch-1.0-2no1linux.2020 No1Linuxer 2020.03.05 3
195 [No1.Linux2020/noarch] rotatescreen-hp-1.0-2no1linux.2020 No1Linuxer 2020.03.05 4
194 [No1.Linux2020/noarch] rotatescreen-yoga3-1.0-2no1linux.2020 No1Linuxer 2020.03.05 3
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11