提交 9df3fd1d 编写于 作者: M mayunteng_1

检视穿越md文件修改

Signed-off-by: Nmayunteng_1 <mayunteng@huawei.com>
Change-Id: Ia7c5ffc8f65401116ea850d556f819ac045bc95d
上级 b3fea490
...@@ -35,13 +35,13 @@ enable(enable: boolean, callback: AsyncCallback&lt;void&gt;): void ...@@ -35,13 +35,13 @@ enable(enable: boolean, callback: AsyncCallback&lt;void&gt;): void
try { try {
inputDeviceCooperate.enable(true, (error) => { inputDeviceCooperate.enable(true, (error) => {
if (error) { if (error) {
console.log(`Key mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Keyboard mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
return; return;
} }
console.log(`Key mouse crossing enable success.`); console.log(`Keyboard mouse crossing enable success.`);
}); });
} catch (error) { } catch (error) {
console.log(`Key mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Keyboard mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
} }
``` ```
...@@ -75,12 +75,12 @@ enable(enable: boolean): Promise&lt;void&gt; ...@@ -75,12 +75,12 @@ enable(enable: boolean): Promise&lt;void&gt;
```js ```js
try { try {
inputDeviceCooperate.enable(true).then(() => { inputDeviceCooperate.enable(true).then(() => {
console.log(`Key mouse crossing enable success.`); console.log(`Keyboard mouse crossing enable success.`);
}, (error) => { }, (error) => {
console.log(`Key mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Keyboard mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}); });
} catch (error) { } catch (error) {
console.log(`Key mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Keyboard mouse crossing enable failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
} }
``` ```
...@@ -98,7 +98,7 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCal ...@@ -98,7 +98,7 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCal
| -------- | ---------------------------- | ---- | ---------------------------- | | -------- | ---------------------------- | ---- | ---------------------------- |
| sinkDeviceDescriptor | string | 是 | 键鼠穿越目标设备描述符。 | | sinkDeviceDescriptor | string | 是 | 键鼠穿越目标设备描述符。 |
| srcInputDeviceId | number | 是 | 键鼠穿越待穿越外设标识符。 | | srcInputDeviceId | number | 是 | 键鼠穿越待穿越外设标识符。 |
| callback | AsyncCallback\<void> | 是 | 回调函数,异步返回键鼠穿越启动、停止结果。| | callback | AsyncCallback\<void> | 是 | 回调函数,异步返回键鼠穿越启动、停止状态。|
**错误码:** **错误码:**
...@@ -115,13 +115,13 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCal ...@@ -115,13 +115,13 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCal
try { try {
inputDeviceCooperate.start(sinkDeviceDescriptor, srcInputDeviceId, (error) => { inputDeviceCooperate.start(sinkDeviceDescriptor, srcInputDeviceId, (error) => {
if (error) { if (error) {
console.log(`Start key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Start Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
return; return;
} }
console.log(`Start key mouse crossing success.`); console.log(`Start Keyboard mouse crossing success.`);
}); });
} catch (error) { } catch (error) {
console.log(`Start key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Start Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
} }
``` ```
...@@ -162,12 +162,12 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise\<void> ...@@ -162,12 +162,12 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise\<void>
```js ```js
try { try {
inputDeviceCooperate.start(sinkDeviceDescriptor, srcInputDeviceId).then(() => { inputDeviceCooperate.start(sinkDeviceDescriptor, srcInputDeviceId).then(() => {
console.log(`Start key mouse crossing success.`); console.log(`Start Keyboard mouse crossing success.`);
}, (error) => { }, (error) => {
console.log(`Start key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Start Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}); });
} catch (error) { } catch (error) {
console.log(`Start key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Start Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
} }
``` ```
...@@ -193,13 +193,13 @@ stop(callback: AsyncCallback\<void>): void ...@@ -193,13 +193,13 @@ stop(callback: AsyncCallback\<void>): void
try { try {
inputDeviceCooperate.stop((error) => { inputDeviceCooperate.stop((error) => {
if (error) { if (error) {
console.log(`Stop key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Stop Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
return; return;
} }
console.log(`Stop key mouse crossing success.`); console.log(`Stop Keyboard mouse crossing success.`);
}); });
} catch (error) { } catch (error) {
console.log(`Stop key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Stop Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
} }
``` ```
...@@ -222,12 +222,12 @@ stop(): Promise\<void> ...@@ -222,12 +222,12 @@ stop(): Promise\<void>
```js ```js
try { try {
inputDeviceCooperate.stop().then(() => { inputDeviceCooperate.stop().then(() => {
console.log(`Stop key mouse crossing success.`); console.log(`Stop Keyboard mouse crossing success.`);
}, (error) => { }, (error) => {
console.log(`Stop key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Stop Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}); });
} catch (error) { } catch (error) {
console.log(`Stop key mouse crossing failed. error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Stop Keyboard mouse crossing failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
} }
``` ```
...@@ -322,7 +322,7 @@ on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, even ...@@ -322,7 +322,7 @@ on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, even
```js ```js
try { try {
inputDeviceCooperate.on('cooperation', (data) => { inputDeviceCooperate.on('cooperation', (data) => {
console.log(`Key mouse crossing event: ${JSON.stringify(data)}`); console.log(`Keyboard mouse crossing event: ${JSON.stringify(data)}`);
}); });
} catch (err) { } catch (err) {
console.log(`Registered failed, error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Registered failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
...@@ -351,7 +351,7 @@ off(type: 'cooperation', callback?: AsyncCallback\<void>): void ...@@ -351,7 +351,7 @@ off(type: 'cooperation', callback?: AsyncCallback\<void>): void
```js ```js
// 取消注册单个回调函数 // 取消注册单个回调函数
callback: function(event) { callback: function(event) {
console.log(`Key mouse crossing event: ${JSON.stringify(event)}`); console.log(`Keyboard mouse crossing event: ${JSON.stringify(event)}`);
return false; return false;
}, },
try { try {
...@@ -364,7 +364,7 @@ try { ...@@ -364,7 +364,7 @@ try {
```js ```js
// 取消注册所有回调函数 // 取消注册所有回调函数
callback: function(event) { callback: function(event) {
console.log(`Key mouse crossing event: ${JSON.stringify(event)}`); console.log(`Keyboard mouse crossing event: ${JSON.stringify(event)}`);
return false; return false;
}, },
try { try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册