OpenHarmony 如何切换输入法

1、命令切换:默认已配置环境,hdc可用

hdc_std.exe shell aa start ability -a InputMethod -b cn.openharmony.inputmethodchoosedialog

 

2、代码切换:

import inputMethod from '@ohos.inputmethod'
...
let setting = inputMethod.getInputMethodSetting()
setting.displayOptionalInputMethod()

posted on 2023-06-14 17:20  EthanDong  阅读(261)  评论(0编辑  收藏  举报

导航