TouchRelay for Mac
Make an external USB touchscreen work natively on macOS: tap, drag, smooth scrolling with momentum, pinch-to-zoom and multi-finger swipes. Giúp màn hình cảm ứng USB rời hoạt động như native trên macOS: chạm, kéo, cuộn mượt có quán tính, pinch-zoom và vuốt nhiều ngón.
Click a screenshot to enlarge, then use ← → to browse.Bấm vào ảnh để phóng to, rồi dùng ← → để xem tiếp.
Why it existsVì sao cần
macOS has no support for third-party touchscreens: plug one in and it acts like a one-point mouse. No scrolling, no pinch, and two fingers make a mess. TouchRelay reads the screen's raw HID reports, recognises gestures and sends the events macOS apps already understand. macOS không hỗ trợ màn hình cảm ứng của bên thứ ba: cắm vào chỉ như một con chuột 1 điểm, không cuộn, không pinch, chạm 2 ngón thì loạn. TouchRelay đọc báo cáo HID thô của màn hình, nhận diện cử chỉ và gửi các sự kiện mà app macOS đã hiểu.
FeaturesTính năng
A small menu bar app. Pure Rust, no dependencies, and it never connects to the network.Một app nhỏ trên thanh menu. Rust thuần, không dependency, không bao giờ kết nối mạng.
Native gesturesCử chỉ như native
Tap, double tap, right click, drag, momentum scrolling, pinch, three-finger swipes.Chạm, chạm đôi, click phải, kéo, cuộn quán tính, pinch, vuốt 3 ngón.
On-screen keyboardBàn phím ảo
A compact floating keyboard appears when you tap a text field. Drag to move it; tap twice with 3 fingers to show or hide it.Bàn phím nổi gọn tự hiện khi chạm vào ô nhập. Kéo để di chuyển; chạm 2 lần bằng 3 ngón để hiện/ẩn.
Smart dragKéo thông minh
One-finger drag chooses mouse drag or scroll from what is under your finger.Kéo 1 ngón tự chọn kéo chuột hay cuộn theo thứ nằm dưới ngón tay.
Smart tapChạm thông minh
A tap that just misses a small button snaps to the nearest control.Chạm trượt một nút nhỏ sẽ tự hút vào điều khiển gần nhất.
Calibration & touch mapHiệu chỉnh & bản đồ chạm
Fix sensors that are not linear near the edges, and see in yellow where your screen detects touch.Sửa cảm biến không tuyến tính ở mép, và xem màu vàng nơi màn hình nhận chạm.
Hot-plugCắm/rút nóng
Unplug and replug the screen at any time; no restart.Cắm hoặc rút màn hình lúc nào cũng được, không cần mở lại app.
Native settingsCài đặt native
System-Settings-style window, English and Vietnamese that follow the system language.Cửa sổ kiểu System Settings, tiếng Anh và tiếng Việt theo ngôn ngữ hệ thống.
Open sourceMã nguồn mở
MIT licensed. Reports from other touchscreens are very welcome.Giấy phép MIT. Rất mong báo cáo từ các màn hình cảm ứng khác.
GesturesCử chỉ
| On the touchscreenTrên màn hình cảm ứng | Result on macOSKết quả trên macOS |
|---|---|
| Tap with 1 fingerChạm 1 ngón | Left click (two quick taps = double click)Click trái (chạm nhanh 2 lần = double-click) |
| Drag with 1 fingerKéo 1 ngón | Smart: mouse drag on sliders, scroll bars, title bars; scroll on scrollable contentThông minh: kéo chuột trên thanh trượt, thanh cuộn, thanh tiêu đề; cuộn trên nội dung cuộn được |
| Hold ~0.3 s, then dragGiữ yên ~0.3s rồi kéo | Mouse drag: sliders, selection, windowsKéo chuột: thanh trượt, chọn chữ, cửa sổ |
| Drag with 2 fingersKéo 2 ngón | Smooth scroll with momentumCuộn mượt có quán tính |
| Tap with 2 fingersChạm 2 ngón | Right clickClick phải |
| Pinch / spreadChụm / xoè | ZoomZoom |
| Swipe 3 fingers left / rightVuốt 3 ngón trái / phải | Switch SpaceChuyển Space |
| Swipe 3 fingers up / downVuốt 3 ngón lên / xuống | Mission Control / App ExposéMission Control / App Exposé |
| Tap twice with 3 fingers, or hold them still for 3 sChạm 2 lần bằng 3 ngón, hoặc giữ yên 3 ngón 3 giây | Show / hide the on-screen keyboardHiện / ẩn bàn phím ảo |
Tested hardwarePhần cứng đã thử
| TouchscreenMàn hình cảm ứng | ResultKết quả |
|---|---|
ILITEK-TP (0x222a:0x0001), 10 points, 2560×1600 | WorksHoạt động |
Any screen that exposes a standard HID Digitizer / Touch Screen should work. Please open an issue with your device's report descriptor if yours does not. Mọi màn hình dùng chuẩn HID Digitizer / Touch Screen đều nên chạy. Nếu màn hình của bạn không chạy, hãy mở issue kèm report descriptor của thiết bị.
InstallCài đặt
macOS 13 or later, Apple Silicon or Intel.macOS 13 trở lên, Apple Silicon hoặc Intel.
Option A: build from source (recommended)Cách A: tự build từ mã nguồn (khuyên dùng)
# Rust (rustup.rs) + Xcode Command Line Tools
git clone https://github.com/fpt-duongtx/touchrelay.git
cd touchrelay
INSTALL=1 ./scripts/make-app.sh
open /Applications/TouchRelay.app
Option B: download the app (DMG)Cách B: tải app (DMG)
- Download
TouchRelay.dmg(a universal Apple Silicon + Intel app) from Releases. Its MD5 and SHA-256 checksums are published next to it.TảiTouchRelay.dmg(app universal Apple Silicon + Intel) ở trang Releases. Mã MD5 và SHA-256 được đăng ngay cạnh file. - Optional: check it in Terminal:
md5 -q ~/Downloads/TouchRelay.dmgand compare with the.md5file.Tuỳ chọn: kiểm tra trong Terminal:md5 -q ~/Downloads/TouchRelay.dmgrồi so với file.md5. - Open the DMG and drag TouchRelay onto Applications.Mở file DMG và kéo TouchRelay vào Applications.
- Open TouchRelay. If macOS says it cannot verify the app, follow If macOS blocks the app below.Mở TouchRelay. Nếu macOS báo không xác minh được app, làm theo mục Nếu macOS chặn app bên dưới.
Download TouchRelay.dmgTải TouchRelay.dmg
For the lazy: one paste in TerminalCho ai lười: dán một lần vào Terminal
Downloads the latest DMG, checks the MD5, copies the app to Applications, marks it as trusted (removes the quarantine flag, so there is no Gatekeeper prompt) and opens it. Tải DMG mới nhất, kiểm tra MD5, chép app vào Applications, đánh dấu tin cậy (gỡ cờ quarantine nên không bị Gatekeeper hỏi) rồi mở app.
cd ~/Downloads
curl -fLO https://github.com/fpt-duongtx/touchrelay/releases/latest/download/TouchRelay.dmg
curl -fLO https://github.com/fpt-duongtx/touchrelay/releases/latest/download/TouchRelay.dmg.md5
[ "$(md5 -q TouchRelay.dmg)" = "$(cut -d' ' -f1 TouchRelay.dmg.md5)" ] && echo "MD5 OK" || echo "MD5 MISMATCH - stop here"
hdiutil attach -nobrowse -quiet -mountpoint /tmp/touchrelay-dmg TouchRelay.dmg
cp -R /tmp/touchrelay-dmg/TouchRelay.app /Applications/
hdiutil detach -quiet /tmp/touchrelay-dmg
xattr -dr com.apple.quarantine /Applications/TouchRelay.app
open /Applications/TouchRelay.app
First launchLần đầu mở
- Turn on Input Monitoring and Accessibility for TouchRelay (the app opens the right page).Bật Input Monitoring và Accessibility cho TouchRelay (app tự mở đúng trang).
- Reopen the app. The ☝︎ icon appears in the menu bar.Mở lại app. Icon ☝︎ hiện trên thanh menu.
- If touches are slightly off, open Tools → Touch area test, then Touch calibration.Nếu chạm hơi lệch, mở Công cụ → Kiểm tra vùng chạm, rồi Hiệu chỉnh vị trí chạm.
If macOS blocks the appNếu macOS chặn app
Because TouchRelay is not notarized by Apple, Gatekeeper may say it cannot verify the app. You can still open it once you trust it. You only need to do this once per version.Vì TouchRelay chưa được Apple notarize, Gatekeeper có thể báo không xác minh được app. Bạn vẫn mở được khi đã tin nguồn tải. Chỉ cần làm một lần cho mỗi phiên bản.
Step 1 · Try to open itBước 1 · Thử mở app
Open TouchRelay from Applications. macOS shows a message that it could not verify the app. Click Done (do not click Move to Trash).Mở TouchRelay trong Applications. macOS hiện thông báo không xác minh được app. Bấm Done (đừng bấm Move to Trash).
Step 2 · Choose Open AnywayBước 2 · Chọn Open Anyway
Go to System Settings → Privacy & Security and scroll to Security. Next to “TouchRelay was blocked to protect your Mac” click Open Anyway.Vào System Settings → Privacy & Security, cuộn xuống mục Security. Cạnh dòng “TouchRelay was blocked to protect your Mac” bấm Open Anyway (tên nút theo ngôn ngữ hệ thống).
Step 3 · ConfirmBước 3 · Xác nhận
Enter your password or use Touch ID, then click Open Anyway once more. TouchRelay starts and will not ask again for this version.Nhập mật khẩu hoặc dùng Touch ID, rồi bấm Open Anyway thêm lần nữa. TouchRelay sẽ mở và không hỏi lại với phiên bản này.
macOS 14 or earlier: Control-click the app → Open → Open. Terminal alternative: macOS 14 trở xuống: Control-click vào app → Open → Open. Hoặc dùng Terminal:
xattr -dr com.apple.quarantine /Applications/TouchRelay.app
FAQ
Is it on the Mac App Store?Có trên Mac App Store không?
No. The sandbox blocks posting events, the Accessibility API and exclusive HID access, which this app needs.Không. Sandbox chặn phát sự kiện, Accessibility API và chiếm độc quyền HID, những thứ app cần.
Does it collect data?Có thu thập dữ liệu không?
No. It has no network code, analytics or auto-update.Không. App không có mã mạng, phân tích hay tự cập nhật.
Why can't I tap the very edge?Vì sao không chạm được sát mép?
Some sensors do not cover the whole panel. The Touch area test shows where; TouchRelay can stretch the reachable area to the edge.Một số cảm biến không phủ hết tấm nền. Kiểm tra vùng chạm cho thấy chỗ nào; TouchRelay có thể kéo vùng chạm được ra tới mép.