Easydict for Windows is a native Windows dictionary, translation, and OCR lookup app. It aims to preserve the core Easydict workflow from macOS while using Windows-native desktop technology for shortcuts, screen capture, OCR, popup display, and background operation.
This repository is intentionally separate from the macOS project. The two clients should share product thinking and service behavior, but they should not be forced into the same platform architecture.
The project currently contains a first runnable skeleton:
- Main WPF control window
- Global hotkeys
- Non-activating query popup window
- Full-screen capture service
- Region screenshot selection
- Windows OCR service wrapper
- Tray background operation
- Selected text lookup through clipboard preservation
- Persistent settings under
%APPDATA%\Easydict\settings.json - Custom HTTP translation provider with JSON/Form request support
- Single-instance startup guard
- Local crash logs under
%APPDATA%\Easydict\logs - Optional current-user launch at login
- Query history under
%APPDATA%\Easydict\history.json - Tray menu actions for lookup, OCR, region OCR, and history
- Language/runtime: C# with .NET 8
- UI: WPF
- Native integration: Win32 interop
- OCR: Windows Runtime OCR (
Windows.Media.Ocr) - Packaging target: MSIX or standalone installer in a later milestone
WPF is selected for the first Windows version because Easydict depends on classic desktop behaviors that are still easiest to implement reliably with WPF and Win32:
- Registering global hotkeys
- Showing popup windows without stealing focus
- Placing floating windows near the cursor
- Capturing screens across monitors
- Running as a tray app
- Interoperating with clipboard and foreground-window APIs
WinUI 3 can be reconsidered later for a larger UI rewrite, but it adds friction for the low-level desktop behaviors that matter most in the first version.
Easydict/
AGENTS.md
README.md
docs/
PRODUCT_SPEC.md
TECHNICAL_DESIGN.md
IMPLEMENTATION_PLAN.md
Easydict.Windows/
App.xaml
MainWindow.xaml
Services/
Views/
- Windows 10 2004 or newer
- .NET 8 SDK
- Visual Studio 2022 or newer with the desktop development workload
GitHub Actions builds the WPF app on windows-latest, publishes a self-contained win-x64 folder artifact, and validates project XML on Ubuntu.
Workflow:
.github/workflows/windows-build.yml
Build from Windows:
dotnet build .\Easydict.Windows\Easydict.Windows.csprojRun from Windows:
dotnet run --project .\Easydict.Windows\Easydict.Windows.csprojScripted build:
.\scripts\build.ps1 -Configuration ReleasePublish a self-contained x64 folder build:
.\scripts\publish-win-x64.ps1Ctrl+Alt+A: show manual input popupCtrl+Alt+D: selected-text lookupCtrl+Alt+S: capture screen and run OCR
These defaults can be changed in the main window with shortcut strings such as Ctrl+Alt+D, Ctrl+Shift+Space, or Alt+Q.
The first provider is a generic HTTP POST provider. It supports:
- JSON or form request bodies
- Custom query field name
fromandtolanguage fields- Optional
Authorizationheader - Dot-path JSON result extraction, such as
data.translation - Array index result paths, such as
choices.0.message.content - Friendly rendering for
question,options, andanswersearch results - One-click preset for
http://47.109.40.237:5000/api/v1/search
If no API URL is configured, the app uses a local placeholder translator so the lookup UI remains testable.