HarmonyOS 输入法框架有没有主动修改回车键类型的接口?

输入法框架有没有主动修改回车键类型的接口?

回车键类型参考下面:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-textinput-V5#enterkeytype

HarmonyOS
2024-12-23 16:32:58
浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
zbw_apple

参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-inputmethod-V5#enterkeytype10

设置enterKeyType数值:

let textConfig: inputMethod.TextConfig = {
  inputAttribute: {
    textInputType: 0,
    enterKeyType: 1
  }
};
inputMethod.getController().attach(true, textConfig, (err: BusinessError) => {
  if (err) {
    console.error(`Failed to attach: ${JSON.stringify(err)}`);
    return;
  }
  console.log('Succeeded in attaching the inputMethod.');
});
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
分享
微博
QQ
微信
回复
2024-12-23 19:12:28
相关问题
输入法编程接口吗?
5599浏览 • 1回复 待解决
HarmonyOS 自带输入法输入问题
1124浏览 • 1回复 待解决
HarmonyOS 输入法光标控制
1120浏览 • 1回复 待解决
HarmonyOS 输入法键盘按键按压效果?
1149浏览 • 2回复 待解决
如何监听输入法输入内容变化?
1315浏览 • 1回复 待解决
HarmonyOS如何监听输入法显示隐藏
1509浏览 • 1回复 待解决
HarmonyOS 输入法高度是如何确定
1392浏览 • 1回复 待解决
小程序输入法键盘光标问题
1310浏览 • 1回复 待解决
HarmonyOS 本地模拟器怎么使用输入法
839浏览 • 1回复 待解决
HarmonyOS 当前网络框架有哪些
781浏览 • 1回复 待解决