提交 8221bb6e 编写于 作者: M mayunteng_1

【多模子系统】接口文档及指南修改

Signed-off-by: Nmayunteng_1 <mayunteng@huawei.com>
Change-Id: Iaa9a20fd40d1814204b6771bc0ba24304df27a31
上级 b9f67eb9
......@@ -41,7 +41,7 @@ try {
inputDevice.getDeviceList().then(data => {
for (let i = 0; i < data.length; ++i) {
inputDevice.getKeyboardType(data[i]).then(type => {
if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD) {
if (type === inputDevice.KeyboardType.ALPHABETIC_KEYBOARD) {
// 物理键盘已连接
isPhysicalKeyboardExist = true;
}
......@@ -53,7 +53,7 @@ try {
console.log(`Device event info: ${JSON.stringify(data)}`);
inputDevice.getKeyboardType(data.deviceId, (error, type) => {
console.log("The keyboard type is: " + type);
if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'add') {
if (type === inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'add') {
// 物理键盘已插入
isPhysicalKeyboardExist = true;
} else if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'remove') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册