Project Info
Inspiration
Most Android Zhuyin keyboards are either difficult to customize, rely heavily on cloud services, or do not feel natural for Taiwanese users. I wanted a privacy-first keyboard that works offline and can be adjusted to match the user's typing habits.
What it does
Dynamic Zhuyin Keyboard is an Android keyboard designed for Traditional Chinese users in Taiwan. It supports customizable key layout, on-device user dictionary learning, candidate suggestions, and learning-data management without requiring network access.
How we built it
The keyboard is built with Kotlin for Android. Codex and GPT-5.6 were used to review the existing codebase, implement new features, improve user-dictionary behavior, test builds, and document the development process.
Challenges we ran into
The main challenges were handling Zhuyin composition correctly, ranking candidates naturally, keeping learning data safe, and making import/export reliable for larger dictionaries.
Accomplishments we're proud of
We created a working offline Zhuyin keyboard with customizable layout and local learning. During the hackathon, we focused on improving the user dictionary, learning controls, import/export, and typing reliability.
What we learned
We learned that keyboard quality depends on many small details, including composition behavior, candidate ranking, layout spacing, and data safety. AI-assisted development was most useful when paired with repeated testing on a real device.
What's next
Next, we plan to improve composing text and candidate ranking, add more Taiwanese vocabulary, refine the UI, expand testing, and prepare a stable public release.
動態注音鍵盤(Dynamic Zhuyin Keyboard)
📥 透過 Google Play 參加測試與下載
需要 Android 7.0 以上。請使用同一個 Google 帳號依序完成以下步驟:
若測試頁面或商店顯示無法存取,請先確認已加入群組、完成加入測試,且網頁與手機的 Google Play 使用同一個帳號。 安裝後開啟「動態注音鍵盤」,依序點選「啟用鍵盤」與「切換鍵盤」。
直接下載 APK
也可下載 Android APK(v1.3.1),下載後開啟 .apk 安裝。
若從 Releases 頁面下載,請展開 Assets 並選擇 .apk 檔;Source code 是原始碼,不能直接安裝。
一套在 Android 裝置本機運作的注音(Bopomofo/ㄅㄆㄇ)輸入法,採用「動態鍵盤」 設計,目標是提供接近 iOS 注音輸入法的輸入體驗,同時保持完全離線、注重隱私。
這是什麼?
「動態注音鍵盤」把注音符號放在固定位置,輸入時只更新候選列與可用的下一鍵, 減少鍵位跳動,並以裝置本機的詞庫提供候選字/詞。
為什麼做這個?
- 提供繁體中文使用者更接近 iOS 注音輸入法的動態鍵盤手感。
- 完全離線:不宣告網路權限,輸入內容與候選學習都在裝置本機完成。
- 注重隱私:不蒐集、不上傳打字內容。
主要功能
- 動態注音鍵盤:按鍵位置固定,輸入時不跳位。
- 注音候選查詢:使用本地產生的注音候選字典。
- 連續整句解碼:組合多個已知詞與單字,支援「一/不」變調與保留後綴的首字修正。
- 注音、英文、數字與符號頁;「ABC」/「注」在同一套鍵盤內一鍵往返。
- 系統淺色/深色主題、可預覽的本機 TTF/OTF 字型匯入與預設字型還原。
- 在「字體大小、鍵盤高度與外觀」調整注音字大小(16–40)並即時預覽;注音/聲調與候選字可分開調整。
- Emoji 分為表情、手勢、動物、飲食、活動、旅行、符號七類,使用 ◀/▶ 翻頁;空白鍵旁顯示目前頁碼。
- 本機候選學習:常用的字/詞會隨著使用往前排。
- 使用者詞典:支援手動詞彙、暫停/清除學習、匯入/匯出。
- 一聲與空白鍵邏輯合併,不另外顯示一聲按鍵。
- 未選字的注音可點入原文或長按空白左右滑動游標,從中間補字、刪除或改聲調;移動游標不會自動選第一組候選。游標移出注音範圍時保留原注音文字。
安裝
Google Play 測試版請依照上方步驟加入群組、參加測試並安裝。 正式簽署 APK 與 checksum 請見 Releases。 Android 7.0 以上可安裝。1.1.1 起內建英文鍵盤,不再需要另一套輸入法來輸入英文。
GitHub 直接下載的 APK 與 Google Play 版是兩個獨立的 App,請擇一安裝:
- GitHub APK:應用程式 ID
com.ioszhuyin.keyboard,可直接覆蓋更新先前的 GitHub 版本,資料會保留。 - Google Play:應用程式 ID
dynamic.zhuyin.keyboard,由 Google Play 更新。
兩者可同時安裝但資料不互通,也不能互相覆蓋更新。
舊 Build Week debug 版簽章不同,轉換前請先匯出字典,再移除舊版、安裝正式版。 詳見發版與版本規則。
也可以從原始碼自行建置:
建置與安裝
需求:
- JDK 17
- Android SDK 36.1
- Android Build Tools 36.1.0
- Android 7.0(API 24)以上的裝置或模擬器
在 Windows PowerShell 執行:
.\gradlew.bat testGithubDebugUnitTest lintGithubDebug assembleGithubDebug
產生的 APK 位於:
app/build/outputs/apk/github/debug/app-github-debug.apk
Debug APK 使用開發測試簽章,套件名稱為 com.ioszhuyin.keyboard.debug,顯示為「動態注音鍵盤(測試版)」。可與正式版並存;設定與字典各自保存。
也可以連接已開啟 USB 偵錯的 Android 裝置後直接安裝:
.\gradlew.bat installGithubDebug
安裝後開啟「動態注音鍵盤(測試版)」應用程式:
- 點選「啟用鍵盤」,在 Android 輸入法設定中啟用「動態注音鍵盤」。
- 返回應用程式並點選「切換鍵盤」,選擇「動態注音鍵盤」。
- 在任意文字欄位輸入注音;候選列會隨每個注音符號更新。
螢幕截圖
Android 模擬器實際執行畫面:


Roadmap 與已知限制
- 1.2.0 起:長按空白左右滑動移動游標、全/半形符號、常用 Emoji、剪貼簿歷史/釘選與公開版面調整。剪貼簿歷史需自行開啟,未釘選最多 50 筆、超過 1 小時者於下次使用剪貼簿時清除;釘選不自動清除。詳見 功能與驗證。
- 整句排序採用離線詞頻順序、詞長與本機偏好,沒有網路模型。另提供小型常見接續詞與本機學習的下一詞提示,尚非完整語境預測。
- 每個音節位置保留最多 9 條解碼路徑,詞邊最多 16 音節;整句長度沒有 3 音節限制。
- 自訂字型支援 TTF/OTF(上限 20 MB);缺字會退回內建/系統字型。系統字型清單仍待研究。
- 裝置廠牌、較舊 Android 版本與實體裝置的持續測試仍需要回報。
- 目前進度請見 Issues 與 CHANGELOG。
隱私
本鍵盤不宣告網路權限,輸入內容在裝置本機處理,不會上傳。候選學習與使用者詞典 也都保存在裝置本機。
隱私權政策請看:
PrivacyPolicy.zh-TW.mdPrivacyPolicy.md
字典資料
目前實際打包在專案中的候選字典是:
app/src/main/assets/zhuyin_cedict.tsv
這份檔案合併兩種已標示來源的資料:CC-CEDICT 的繁體詞條與拼音讀音會轉成注音查詢鍵; McBopomofo 的多字片語讀音會補充台灣常用詞,並使用其彙總詞頻排列候選。原始語料不會 打包進 App。
轉換腳本:
tools/build_zhuyin_dictionary.pytools/rank_zhuyin_dictionary.pytools/merge_mcbopomofo_dictionary.py
資料來源與授權請看:
NOTICE.mdNOTICE.zh-TW.mdapp/src/main/assets/zhuyin_cedict_LICENSE.txttools/data/README.md
回報問題與貢獻
發現 bug 或想提功能建議,請到 Issues 開新的 issue。
貢獻前請注意:
- 先確認 issue 尚未有人處理,並在 issue 中說明你的計畫。
- 新增第三方資料、詞庫、字型或素材前,請先確認授權,並同步更新
NOTICE.md與NOTICE.zh-TW.md(包含來源網址、取得日期、授權條款與轉換方式)。 - 修改後請執行
.\gradlew.bat testGithubDebugUnitTest lintGithubDebug assembleGithubDebug確認測試、 lint 與建置通過。 - 發 PR 前請與
main同步,並清楚說明改動範圍。
專案歷史
本專案起源於 OpenAI Build Week 期間,以 Codex 與 GPT-5.6 協助延伸與穩定一個 活動前就已能運作的 Android 注音鍵盤原型;既有成果保留為 baseline,活動期間新增的 功能與修正則逐項記錄於 commit 歷史。
所有模型產生的修改都經過人工檢查、實際建置與裝置測試後才接受。這段歷史保留在本節 作為透明紀錄,不作為專案目前的中心定位。
授權
除另有標示者外,本專案的原始程式碼採用 Apache License 2.0。
根目錄的 Apache-2.0 不會重新授權第三方資料。由 CC-CEDICT 轉換而來的候選資料遵守 CC BY-SA 4.0;McBopomofo 片語讀音與彙總詞頻資料遵守其 MIT License 與上游資料聲明; ToneOZ 字型 subset 遵守 SIL Open Font License 1.1。完整來源、轉換方式與授權副本請見 NOTICE.zh-TW.md 與 NOTICE.md。
Analysis
View
Metric
- 17
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- KotlinIn code
- PythonIn code
2 of 2 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
327 KB
Source files
40
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
RaibowSky/dynamic-zhuyin-keyboard
58 files · 18.6 MB · @ 952b52e
Structure
Interface
24 files · 41%Screens, components and styles rendered to the user.
Application logic
7 files · 12%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Kotlin82%
- Markdown10%
- Python6%
- XML3%
Share of indexed source by file size. Binary and vendored files are excluded.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.