想去哪里?

首页 页面 关于 页面 项目 页面 简历 页面 技术 页面 随笔 页面 联系 页面 隐私政策 页面 Terminal Spike 隐私政策 页面 用 Astro 构建文档与职业个人网站 技术 通过 tmux、Mosh、Termius 与 Tailscale 随处使用 Codex 技术 用 Langfuse 观察 Codex 的 MCP 工具调用 技术 产品应用中的本地化 技术 把 MCP 作为安全的 AI 集成边界 技术 用 Zod、OpenAPI 与 Swagger 维护 API 契约 技术 用 pg-boss 运行持久后台任务 技术 通过真实知识工作流理解 pgvector 与 RAG 技术 Pi Edge:让 Pi 待在 Obsidian 笔记旁 技术 为真实排序任务设计拖放交互 技术 Prisma 与 PostgreSQL:产品状态的事实来源 技术 把 Ralph Loop 当作计划队列 技术 用 React Router 组织全栈产品工作流 技术 把 shadcn 风格组件变成自己的产品系统 技术 用表格与编辑器承载密集业务操作 技术 Terminal Spike:原生 Android 终端 技术 在 Linux 上用 fcitx 输入带声调的拼音 技术 在 Linux 上配置 DEFT Pro 轨迹球 技术 在 KOReader 上使用 Pocket 稍后读 技术 为 Vercel AI SDK 设置明确的工具边界 技术 垂直切片架构与 dependency-cruiser 技术 用 Vitest 与 Playwright 测试产品工作流 技术 我的随处工作流:Herdr、code-server、Obsidian 与 Pi Edge 技术 Zod 不只是校验 技术 《卡拉马佐夫兄弟》是我看过最好的小说 随笔 基督徒口述1960劳改历史 随笔 圣经中的“道”与言语 随笔 我们爱,因为神先爱我们,而不是空洞的“自爱” 随笔 妈妈,让我来承担爸爸的过错吧 随笔 我与神的故事 随笔 世界远离上帝,接近中国 随笔 “爱的五种语言”和内外向,只存在于语言中 随笔 人格类型不存在,你在世界而非概念中生活 随笔 危险的词语:为什么心理学是不可能的 随笔 2000 年,一个深圳打工者的故事 随笔 阿联酋Ras al Khaimah见闻录 随笔 沙甸:1975 年的一场冲突 随笔 关于中国的纪录片 随笔
← 技术/工具

在 Linux 上配置 DEFT Pro 轨迹球

Elecom DEFT Pro 轨迹球在 Linux Xorg 下的配置记录。

这是我在 Manjaro 上使用的 Elecom DEFT Pro 轨迹球 Xorg 配置。

创建配置文件:

/usr/share/X11/xorg.conf.d/99-trackball.conf

关键是 ButtonMapping。第一版把按钮 10 映射为 1,让 Fn1 充当左键;按钮 11 映射为 2,让 Fn2 充当中键。

Section "InputClass"
        # DEFT PRO Buttons:
        #    1: Left button
        #    2: Middle button (wheel click)
        #    3: Right button
        #    4: Wheel scroll up
        #    5: Wheel scroll down
        #    6: Wheel tilt left
        #    7: Wheel tilt right
        #    8: Back button
        #    9: Forward button
        #   10: Fn1 (button on the left of the ball)
        #   11: Fn2 (button on right most)
        #   12: Fn3 (button on the above of the slide switch)
        Identifier      "Elecom DEFT Pro Trackball"
        MatchProduct    "DEFT Pro TrackBall"
    Driver          "libinput"
        Option          "ScrollMethod" "button"
        Option          "ScrollButton" "9"
        Option        "MiddleEmulation" "on"
        Option          "ButtonMapping" "1 2 3 4 5 6 7 8 9 1 2 12"
EndSection

我还用过带滚动按钮锁定的第二版。前进按钮用于切换滚动模式,再通过转动轨迹球滚动。

Section "InputClass"
# DEFT PRO Buttons:
# 1: Left button
# 2: Middle button (wheel click)
# 3: Right button
# 4: Wheel scroll up
# 5: Wheel scroll down
# 6: Wheel tilt left
# 7: Wheel tilt right
# 8: Back button
# 9: Forward button
# 10: Fn1 (button on the left of the ball)
# 11: Fn2 (button on right most)
# 12: Fn3 (button on the above of the slide switch)
Identifier "Elecom DEFT Pro Trackball"
MatchProduct "DEFT Pro TrackBall"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "9"
Option "ScrollButtonLock" "true"
Option "MiddleEmulation" "on"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 12 1 2 9"
EndSection