docs(ime_pinyin): improve the description of mode switching (#3471)

* docs(ime_pinyin): improve the description of mode switching

* Update ime_pinyin.md

* Update ime_pinyin.md

Co-authored-by: 100ask <team100ask@outlook.com>
Co-authored-by: 100ask <48745717+100ask@users.noreply.github.com>
This commit is contained in:
Yobe Zhou
2022-07-11 20:03:26 +08:00
committed by GitHub
parent 56a5742c77
commit 5923494b79

View File

@@ -118,15 +118,31 @@ After writing a dictionary according to the above dictionary format, you only ne
lv_100ask_pinyin_ime_set_dict(pinyin_ime, your_pinyin_dict);
```
## Input modes
## Modes
`lv_ime_pinyin` supports 26 key and 9 key input modes. The mode switching is very simple, just call the function `lv_ime_pinyin_set_mode`. If the second parameter of function `lv_ime_pinyin_set_mode` is' 1 ', switch to 26 key input mode; if it is' 0', switch to 9 key input mode, and the default is' 1 '.
The lv_ime_pinyin have the following modes:
- `LV_IME_PINYIN_MODE_K26` Pinyin 26 key input mode
- `LV_IME_PINYIN_MODE_K9` Pinyin 9 key input mode
- `LV_IME_PINYIN_MODE_K9_NUMBER` Numeric keypad mode
The `TEXT` modes' layout contains buttons to change mode.
To set the mode manually, use `lv_ime_pinyin_set_mode(pinyin_ime, mode)` . The default mode is `LV_IME_PINYIN_MODE_K26` .
<details>
<summary>中文</summary>
<p>
`lv_ime_pinyin` 支持26键和9键输入模式。模式的切换非常简单只需调用函数 `lv_ime_pinyin_set_mode` 即可。如果函数 `lv_ime_pinyin_set_mode` 的第2个参数为 `1` 则切换到 26 键输入模式,如果为 `0` 则切换到 9 键输入法模式,默认为 `1`
lv_ime_pinyin 有以下模式:
- `LV_IME_PINYIN_MODE_K26` 拼音26键
- `LV_IME_PINYIN_MODE_K9` 拼音9键(九宫格)
- `LV_IME_PINYIN_MODE_K9_NUMBER` 九宫格布局的数字键盘
每个模式的布局中都包含有更改到其他模式的按钮。
您可以通过 `lv_keyboard_set_mode(kb, mode)` 函数手动设置模式。默认的模式是 `LV_IME_PINYIN_MODE_K26`
</p>
</details>