How koyasi777/mozkey works
Mozkey is a Mozc-based Japanese IME for Windows and macOS. The user enters kana or romaji through an OS input method; Mozc handles conversion and suggestions, while documented live conversion and optional local Zenz correction augment the result for candidate display and selection. Configuration, dictionaries, and learning history support that workflow. The README documents the Zenz and live-conversion behavior; sampled source supports selected client, renderer, engine-output, and storage relationships, but does not show the full Zenz wiring.
Main entry points: engine_converter.cc Engine converter · renderer_server.cc Candidate UI · mozc_engine.cc OS input method · client.cc IME client
Components 19
Input and UI
- OS input method
src/unix/ibus/mozc_engine.cc - IME client
src/client/client.cc - Candidate UI
src/renderer/renderer_server.cc
Conversion pipeline
- Romaji composer
src/composer/composer.cc - Session handler
src/session/session_handler.cc - Engine converter
src/engine/engine_converter.cc - Kana conversion
src/converter/converter.cc - Prediction
src/prediction/predictor.cc - Candidate rewriting
src/rewriter/rewriter.cc - Engine output
src/engine/engine_output.cc
Language data and learning
- Data manager
src/data_manager/data_manager.cc - System dictionary
src/dictionary/dictionary_impl.cc - User dictionary
src/dictionary/user_dictionary_storage.cc - Learning history
src/prediction/user_history_storage.cc
Zenz correction
- Local Zenz scorer
src/zenz_scorer/main.cc
Platform services
- IME configuration
src/config/config_handler.cc - Process IPC
src/ipc/ipc.cc - Persistent LRU
src/storage/lru_storage.cc
Other components
- IME user
Connections 21
- IME user → OS input method: types into
- OS input method → IME client: forwards input
src/unix/ibus/mozc_engine.cc - IME client → Session handler: sends commands
- Session handler → Romaji composer: updates composition
- Session handler → Engine converter: requests conversion
- Engine converter → Kana conversion: converts reading
- Engine converter → Prediction: requests suggestions
- Engine converter → Candidate rewriting: rewrites candidates
- Engine converter → Engine output: formats results
src/engine/engine_output.cc - Engine output → Candidate UI: supplies candidates
- Candidate UI → IME user: shows candidates
- IME user → Candidate UI: selects candidate
- Engine converter → Local Zenz scorer: applies correction
- Local Zenz scorer → Engine converter: returns correction
- Data manager → System dictionary: loads dictionary data
src/data_manager/data_manager.cc - Engine converter → User dictionary: uses user words
- Engine converter → Learning history: learns selections
- OS input method → Candidate UI: uses renderer client
src/unix/ibus/mozc_engine.cc - IME client → Process IPC: uses IPC interface
- IME configuration → Persistent LRU: persists character forms
- Engine converter → IME configuration: uses conversion settings