ForceTouchTranslator is a lightweight, instant translation tool for macOS. It allows you to Force Click (Deep Press) on your trackpad over any selected sentence or hovered word to display a native Apple-style dark mode translation popover instantly.
Powered by Hammerspoon.
| Hover Single-Word Mode | Selected Sentence Mode |
|---|---|
![]() |
![]() |
- Gesture & Trackpad Native Integration: Uses macOS Force Touch (pressure stage 2) events.
- Smart Text Detection:
- Selected Sentence Mode: Select any sentence or multi-word paragraph and force-click to translate it as a whole without losing your active text selection.
- Hover Single-Word Mode: Hover your cursor over a single word and force-click to translate just that word.
- Universal Application Support: Works seamlessly across Safari, Google Chrome, VS Code, Slack, Obsidian, Preview, PDF Readers, Notes, Pages, and native macOS apps.
- Clipboard Preserved: Automatically restores your original clipboard contents after fetching text.
- Apple UI Aesthetics: Sleek, borderless dark-mode popover with smooth fade-in animations. Dismisses instantly on
Escapeor clicking anywhere outside the window. - Zero API Key Required: Powered by Google Translate free web endpoint.
- Install Hammerspoon for macOS.
- Grant Hammerspoon Accessibility Permissions:
- Open System Settings -> Privacy & Security -> Accessibility
- Enable Hammerspoon.
- Download
forcetouchtranslator.luaand place it in your Hammerspoon folder (~/.hammerspoon/). - Open
~/.hammerspoon/init.luaand add this line:dofile(os.getenv("HOME") .. "/.hammerspoon/forcetouchtranslator.lua")
- Reload Hammerspoon config (Click the Hammerspoon menu bar icon -> Reload Config).
You can customize the target language and ignored apps at the top of forcetouchtranslator.lua:
-- Target language for translation (e.g., "tr" for Turkish, "es" for Spanish, "fr" for French, "de" for German)
local TARGET_LANGUAGE = "tr"
-- Applications where Force Touch translation should be ignored
local IGNORED_APPS = {
"Finder",
"Dock"
}This project is licensed under the MIT License.

