Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ GitHub Release 的发布说明;版本与发布流程见 [docs/RELEASE.md](docs

## [1.0.0] - 2026-10-16

首个正式版。

- 键盘和设置页统一为蓝色强调色,工具栏图标加深;修复「切换键盘」和「工具」页内容偏左的问题。
- 语音模型页:新增官方模型下载地址(可复制),并支持直接导入官方 `.tar.bz2` 模型包,不用再自己解压。
- 短信验证码:键盘开着时收到新短信,验证码候选会自动刷新;能识别更多写法(换行、全角数字、带空格或连字符的分组、英文标签),电话、日期、订单号不再误识别。
- 九键拼音补全了更多拼音组合,开启模糊音后 `li`、`xiang` 等读法也能出现。
- 修复在切换布局时点空格偶尔不输入的问题。
- 手写输入入口暂时隐藏。
- 恢复豆包对齐前的按键布局和键帽间距。

### 开发记录

下面是给维护者的细节,不进入 GitHub Release 的发布说明。

- 切换布局时,待处理的行重建会把 `View` 在松手时排进队列的点击一并取消,空格轻点因此丢失。重建轮询现在在看到手指抬起后让出一拍,点击先跑完再重建(`ImeKeyboardView.pendingRowRebuildPoll`)。

- 键盘与设置页统一蓝色强调色,加深工具栏图标并恢复原工具栏顺序;修复切换键盘与工具页网格偏左,窗口变宽或变窄时保持居中。语音模型页统一内容与卡片边距,增加可复制的官方下载地址及导入步骤。

- 短信验证码候选现在会自己刷新。此前顶栏那条「验证码 123456,点击输入」只在键盘弹出或设置变化时算一次,键盘开着时新收到的短信不会出现;现在注册短信内容变化的监听(`Telephony.Sms.CONTENT_URI`),200 毫秒防抖后重算一次候选,权限被收回或键盘收起时自动注销。取出验证码的规则也放宽到实际收到的各种写法:标签与验证码之间可以换行、中文冒号与全角数字都能认,数字可以带空格或连字符分组(`876 523`),英文标签(`code`、`passcode`、`OTP`、`verification code` 等)同样识别;同时收紧误报,电话、日期、订单号和「共/请于/有效期」这类状态句子里的数字不再当验证码。
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
<p align="center"><strong>A local-first Chinese input method for Android.</strong></p>

<p align="center">
<a href="https://github.com/Slacker-LLC/openIME/releases"><img alt="Release" src="https://img.shields.io/github/v/release/Slacker-LLC/openIME?include_prereleases"></a>
<a href="https://github.com/Slacker-LLC/openIME/releases"><img alt="Release" src="https://img.shields.io/github/v/release/Slacker-LLC/openIME"></a>
<a href="https://github.com/Slacker-LLC/openIME/actions/workflows/android.yml"><img alt="Android CI" src="https://github.com/Slacker-LLC/openIME/actions/workflows/android.yml/badge.svg"></a>
<a href="LICENSE"><img alt="License: GPL-3.0-only" src="https://img.shields.io/badge/license-GPL--3.0--only-blue"></a>
</p>

<p align="center">English · <a href="README.zh-CN.md">简体中文</a></p>

> **Beta software (0.0.x).**
> Features, settings and data formats can change between releases.
> Do not use openIME as your only keyboard.
> **openIME 1.0 is the first stable release.**
> Few devices have been tested. Keep another keyboard installed as a fallback.
> Report problems in [Issues](https://github.com/Slacker-LLC/openIME/issues).

openIME is a system keyboard for Android.
Expand Down Expand Up @@ -52,23 +51,28 @@ The app has no `INTERNET` permission, so your text cannot leave the phone.

## Features

- **Keyboards:** 26-key pinyin, nine-key pinyin, stroke, English 26-key, digits and symbols.
- **Keyboards:** 26-key pinyin, nine-key pinyin, double pinyin (Xiaohe and Ziranma), Wubi, stroke, English 26-key, digits and symbols.
Emoji, symbols, clipboard history, quick phrases, text editing and a floating keyboard are also available.
- **Pinyin engine:** [librime](https://github.com/rime/librime) with about 900,000 Rime Ice dictionary entries.
The dictionary is compiled at build time.
The full dictionary is ready a few seconds after the first start.
- **Pinyin input:** full pinyin, abbreviations, manual word splitting, fuzzy pinyin, user-word learning and simplified/traditional conversion.
- **Pinyin input:** full pinyin, abbreviations, manual word splitting, fuzzy pinyin (15 groups), user-word learning, poem-line suggestions and simplified/traditional conversion.
- **Nine-key input:** a column on the left lists the pinyin for the next character.
Tap one syllable to lock it.
- **Voice input:** hold the space key and speak.
openIME inserts the text when you release the key.
The bilingual (Chinese and English) model is in the APK and works without a network.
Options remove filler words and replace punctuation with spaces.
You can also import your own streaming model.
「设置 → 语音模型」 (Settings → Voice model) lists the official download links to copy, and it imports the official `.tar.bz2` packages as they are.
- **Gestures:** swipe up on the delete key to clear the text.
Swipe left or right on the space key to move the cursor.
- **Quick format input:** optional switches in the settings for spaces around numbers and English words,
a period on a double space, calculator results in the candidate bar, first-letter capitalization and a key-sound volume.
- **Emoji suggestions:** after you choose a word, the suggestion bar shows related emoji.
The word list is in the APK.
- **Autofill (Android 11 and later):** account names and codes from your password manager appear in the toolbar.
- **SMS code chip (optional):** the toolbar shows a code from a new text message, in the common formats, and one tap types it.
- **Numbers and symbols:** each letter key shows a number or symbol.
Swipe up to enter it. Press and hold to open a popup, then slide to a cell and release.
- **Display support:** portrait, landscape, tablets, foldables, dark theme and large font sizes.
Expand Down Expand Up @@ -104,7 +108,7 @@ You can install a new release over an old one.

### Known limitations

- Handwriting input has no recognition engine yet. The entry point is hidden.
- Handwriting input is hidden for now. The code stays in the app, but the entry is off.
- The nine-key keyboard does not work with a physical keyboard.
- Some vendor Android versions limit background input methods. Few devices have been tested.
- Android does not install a version that is older than the installed one.
Expand Down
16 changes: 9 additions & 7 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<p align="center"><strong>本地优先的 Android 中文输入法</strong></p>

<p align="center">
<a href="https://github.com/Slacker-LLC/openIME/releases"><img alt="版本" src="https://img.shields.io/github/v/release/Slacker-LLC/openIME?include_prereleases&label=%E7%89%88%E6%9C%AC"></a>
<a href="https://github.com/Slacker-LLC/openIME/releases"><img alt="版本" src="https://img.shields.io/github/v/release/Slacker-LLC/openIME?label=%E7%89%88%E6%9C%AC"></a>
<a href="https://github.com/Slacker-LLC/openIME/actions/workflows/android.yml"><img alt="Android CI" src="https://github.com/Slacker-LLC/openIME/actions/workflows/android.yml/badge.svg"></a>
<a href="LICENSE"><img alt="许可证" src="https://img.shields.io/badge/license-GPL--3.0--only-blue"></a>
</p>

<p align="center"><a href="README.md">English</a> · 简体中文</p>

> **当前处于 Beta 测试阶段(0.0.x)。** 功能和稳定性仍在验证,接口与数据格式可能调整,
> 请不要把它作为日常唯一的输入法。欢迎通过 [Issues](https://github.com/Slacker-LLC/openIME/issues) 反馈问题。
> **openIME 1.0 是首个正式版。** 实机验证的机型还不多,请保留另一款输入法作为备用。
> 欢迎通过 [Issues](https://github.com/Slacker-LLC/openIME/issues) 反馈问题。

openIME 是一款独立的 Android 系统输入法。拼音候选、用户词库学习和语音识别全部在设备本地完成,
应用**没有 `INTERNET` 权限**,输入内容不会离开手机。
Expand Down Expand Up @@ -43,14 +43,16 @@ openIME 是一款独立的 Android 系统输入法。拼音候选、用户词库

## 功能

- **键盘**:26 键拼音、九键拼音、笔画、英文 26 键、数字与符号;Emoji、符号、剪贴板、文本编辑、浮动键盘。
- **拼音**:全拼、简拼、手动分词、候选展开、用户词库学习、简繁转换。
- **键盘**:26 键拼音、九键拼音、双拼(小鹤、自然码)、五笔、笔画、英文 26 键、数字与符号;Emoji、符号、剪贴板、文本编辑、浮动键盘。
- **拼音**:全拼、简拼、手动分词、候选展开、模糊音(15 组)、用户词库学习、诗句联想、简繁转换。
引擎为 librime,内置约 90 万条 Rime Ice 词典记录,打包时已预先编译;安装或升级后第一次打开键盘,几秒内即可用完整词典。
- **九键**:输入时左栏列出下一个字的拼音,一个字选一个音节,选定后自动移到下一个字。
- **语音输入**:长按空格说话,松手后识别并上屏;使用内置的中英双语模型,不联网;可去掉“嗯”“呃”等语气词,也可把标点写成空格。
- **语音输入**:长按空格说话,松手后识别并上屏;使用内置的中英双语模型,不联网;可去掉“嗯”“呃”等语气词,也可把标点写成空格;也可以导入自己的流式模型:「设置 → 语音模型」列出可复制的官方下载地址,官方 `.tar.bz2` 包不用解压,直接导入。
- **手势**:删除键上滑清空;空格左右滑动移动光标,滑动时底行其他按键锁定。
- **快捷格式输入**:设置里可选的开关,包括数字、英文前后加空格,双击空格输入句号,候选栏直接给算式结果,首字母自动大写和按键音量。
- **表情联想**:选词后联想栏先给出相关表情(开心 → 😊),词表内置,不联网。
- **自动填充**:Android 11+ 上,密码管理器的账号、验证码直接显示在键盘工具栏位置。
- **短信验证码**(可选):工具栏显示新短信里的验证码,常见写法都能识别,点一下即输入。
- **数字和符号**:26 键字母键右上角印着数字和符号,上滑直接输入;长按弹出选择面板,滑到目标松手输入。
- **适配**:横竖屏、平板与折叠屏、深色模式、大字号;终端、远程桌面、游戏等原始按键输入框;
外接键盘可直接打拼音。详见 [兼容性说明](docs/COMPATIBILITY.md)。
Expand All @@ -76,7 +78,7 @@ openIME 是一款独立的 Android 系统输入法。拼音候选、用户词库

### 已知限制

- 手写输入尚未接入识别引擎,入口默认隐藏。
- 手写输入暂时隐藏:代码仍在应用里,入口已关闭。
- 九键暂不支持与外接键盘同时使用。
- 部分厂商系统对输入法的后台限制不同,尚未在大量真机上验证。
- 版本号小于此前已装版本时,系统会拒绝覆盖安装;需要先卸载(卸载前可导出用户数据)。
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Do not publish details before the fix is released.

| Version | Status |
|---|---|
| The latest release (beta or stable) | Receives security fixes. We publish them as a new patch or beta version and list them in the change log. |
| The latest stable release | Receives security fixes. We publish them as a new patch version and list them in the change log. |
| Older releases and debug builds | Not maintained. Update to the latest release. |

To verify an APK, compare its SHA-256 checksum with the release notes.
Expand Down
12 changes: 12 additions & 0 deletions docs/APP_UI_SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Files: `values/colors.xml` and `values-night/colors.xml`.

Panels in the keyboard use the keyboard tokens (`ImeTheme.IOS`).
Switches and quick switches in the keyboard use the keyboard accent color.
The keyboard and the app use the same accent: `SetupUi.accent` equals the keyboard theme's `tokens.primary` in light and dark.

## Layout

Expand Down Expand Up @@ -114,8 +115,19 @@ Switches and quick switches in the keyboard use the keyboard accent color.
The panel has no voice input (hold space instead) and no keyboard switch (the toolbar has one).
- The last group in preferences and in the keyboard settings is 关于与数据 ("About and data").
It has two rows: 关于 ("About": version, privacy, diagnostics) and 数据管理 ("Data management": export, import, pre-uninstall note).
- The 切换键盘 ("Switch keyboard") and tools pages center their tile rows in the window.
The rows stay centered when the window width changes.
- The title row has the same background as the panel. The back button has no background and shows feedback only when pressed.

## Voice model page

- The page uses the same 16 dp side margin as the other pages, and its cards use the same width and corner radius.
Text and cards do not drift left or right of the page edge.
- It lists the built-in model and the imported models, with the import button.
- Below the import button it lists the official model packages with their sizes.
Each address can be copied; the page does not download anything.
The text says that the official `.tar.bz2` package imports as it is.

## Width and font changes

- In preferences, segmented controls and sliders always show the label above and the control below. Narrow screens need no layout switch.
Expand Down
8 changes: 5 additions & 3 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,18 @@ Split them next. Follow the package rules above and add no cross-package depende
| 26-key pinyin | `ImeKeyboardView`, `CandidatePipeline`, Rime | Production |
| Nine-key pinyin | `ImeKeyboardView`, `NineKeyLocalDecoder`, Rime | Production. No English nine-key. |
| Stroke | `StrokeKeyboardRenderer`, `StrokeLexicon` | Production |
| Wubi 26-key | `ImeKeyboardView`, `CandidatePipeline`, Rime (`wubi86`) | Production. The table ships only in builds with the local data. |
| Double pinyin | `DoublePinyinScheme`, `ImeKeyboardView`, Rime | Production. Xiaohe and Ziranma schemes. |
| Wubi 26-key | `ImeKeyboardView`, `CandidatePipeline`, Rime (`wubi86`) | Production. |
| English 26-key | `CandidatePipeline`, `CandidateEngine` | Production |
| Digits, phone, decimal | `EditorInfoAdapter`, `NumericKeyboardRenderer` | Production |
| Symbols | `SymbolCatalog`, `CustomSymbolRepository` | Production |
| Emoji | `EmojiCatalog`, `EmojiRecentRepository`, Fluent assets | Production |
| Clipboard history | `ClipboardHistoryRepository`, `InputConnectionGateway` | Production. See the privacy rules above. |
| Quick phrases | `QuickPhraseRepository`, `QuickPhraseEditActivity` | Production |
| Text editing | `InputConnectionGateway` | Production. Available actions depend on the editor. |
| Voice | `VoiceModelLifecycleManager`, sherpa-onnx | Production. Hold space to speak. |
| Handwriting | `HandwritingPadView`, `StrokeMatchHandwritingProvider` | Stroke-table recognition. Builds without the local table hide the entry. |
| Voice | `VoiceModelLifecycleManager`, sherpa-onnx | Production. Hold space to speak. The voice model page imports `.zip`, `.tar`, `.tar.gz` and `.tar.bz2` packages. |
| SMS code chip | `SmsCodeExtractor`, `ImeTopZone` | Production, optional. A content observer on the SMS provider refreshes the chip; it is off until the user grants read-SMS. |
| Handwriting | `HandwritingPadView`, `StrokeMatchHandwritingProvider` | Hidden. `HandwritingFeaturePolicy.ENTRY_OFFERED` is `false`; set it to `true` to show the entry again. |
| Floating keyboard | `FloatingKeyboardController`, `LocalVoiceImeService` | Production |
| Settings | `ImeSettingsRepository`, settings UI | Production |

Expand Down
13 changes: 13 additions & 0 deletions docs/COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ The service clears the response when the user leaves the field.

Android 10 and earlier, and providers without inline support, use the system dropdown menu.

## SMS code chip

The chip is optional and off by default.
When the user turns it on, openIME asks for the read-SMS permission and reads only messages from the last 5 minutes.
A content observer on `Telephony.Sms.CONTENT_URI` recomputes the chip 200 ms after the inbox changes, so a message that arrives while the keyboard is open shows at once.
The observer is removed when the permission is revoked or the keyboard hides.
`SmsCodeExtractor` accepts a label (Chinese or English: `code`, `passcode`, `OTP`, `verification code` and others) followed by a code.
The label and the code can be on different lines, the colon can be full-width, and digits can be full-width or grouped with spaces or hyphens.
It ignores phone numbers, dates, order numbers and status sentences.
The chip does not show in password fields or in fields that ask for no personalised learning.

Verification: `SmsCodeExtractorTest`.

Verification: `InlineChipTrackerTest` and `scripts/beta3_e2e.py autofill`.
The debug build includes a test provider (`TestAutofillService`) and `AutofillTestActivity`.

Expand Down
Loading
Loading