1e41f4b71Sopenharmony_ci# @ohos.multimodalInput.pointer (Mouse Pointer) (System API)
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThe **pointer** module provides APIs related to pointer attribute management.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci> **NOTE**
6e41f4b71Sopenharmony_ci>
7e41f4b71Sopenharmony_ci> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8e41f4b71Sopenharmony_ci>
9e41f4b71Sopenharmony_ci> This topic describes only system APIs provided by the module. For details about its public APIs, see [@ohos.multimodalInput.pointer (Mouse Pointer)](js-apis-pointer.md).
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci## Modules to Import
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci```js
14e41f4b71Sopenharmony_ciimport { pointer } from '@kit.InputKit';
15e41f4b71Sopenharmony_ci```
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci## pointer.setPointerSpeed
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_cisetPointerSpeed(speed: number, callback: AsyncCallback<void>): void
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ciSets the moving speed of the mouse pointer. This API uses an asynchronous callback to return the result.
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci**System API**: This is a system API.
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci**Parameters**
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
30e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
31e41f4b71Sopenharmony_ci| speed    | number                    | Yes   | Moving speed of the mouse pointer. The value ranges from **1** to **11**. The default value is **7**.  |
32e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes   | Callback used to return the result.|
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ci**Error codes**
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
37e41f4b71Sopenharmony_ci
38e41f4b71Sopenharmony_ci| ID| Error Message         |
39e41f4b71Sopenharmony_ci| -------- | ----------------- |
40e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.2.Incorrect parameter types.3.Parameter verification failed. |
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci**Example**
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ci```js
46e41f4b71Sopenharmony_citry {
47e41f4b71Sopenharmony_ci  pointer.setPointerSpeed(5, (error: Error) => {
48e41f4b71Sopenharmony_ci    if (error) {
49e41f4b71Sopenharmony_ci      console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
50e41f4b71Sopenharmony_ci      return;
51e41f4b71Sopenharmony_ci    }
52e41f4b71Sopenharmony_ci    console.log(`Set pointer speed success`);
53e41f4b71Sopenharmony_ci  });
54e41f4b71Sopenharmony_ci} catch (error) {
55e41f4b71Sopenharmony_ci  console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
56e41f4b71Sopenharmony_ci}
57e41f4b71Sopenharmony_ci```
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ci## pointer.setPointerSpeed
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_cisetPointerSpeed(speed: number): Promise<void>
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ciSets the moving speed of the mouse pointer. This API uses a promise to return the result.
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci**System API**: This is a system API.
68e41f4b71Sopenharmony_ci
69e41f4b71Sopenharmony_ci**Parameters**
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
72e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
73e41f4b71Sopenharmony_ci| speed | number | Yes   | Moving speed of the mouse pointer. The value ranges from **1** to **11**. The default value is **7**.|
74e41f4b71Sopenharmony_ci
75e41f4b71Sopenharmony_ci**Return value**
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_ci| Name                 | Description              |
78e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
79e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.|
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ci**Error codes**
82e41f4b71Sopenharmony_ci
83e41f4b71Sopenharmony_ciFor details about the following error codes, see [Screen Hopping Error Codes](../apis-distributedservice-kit/errorcode-devicestatus.md).
84e41f4b71Sopenharmony_ci
85e41f4b71Sopenharmony_ci| ID| Error Message         |
86e41f4b71Sopenharmony_ci| -------- | ----------------- |
87e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.2.Incorrect parameter types.3.Parameter verification failed. |
88e41f4b71Sopenharmony_ci
89e41f4b71Sopenharmony_ci
90e41f4b71Sopenharmony_ci**Example**
91e41f4b71Sopenharmony_ci
92e41f4b71Sopenharmony_ci```js
93e41f4b71Sopenharmony_citry {
94e41f4b71Sopenharmony_ci  pointer.setPointerSpeed(5).then(() => {
95e41f4b71Sopenharmony_ci    console.log(`Set pointer speed success`);
96e41f4b71Sopenharmony_ci  });
97e41f4b71Sopenharmony_ci} catch (error) {
98e41f4b71Sopenharmony_ci  console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
99e41f4b71Sopenharmony_ci}
100e41f4b71Sopenharmony_ci```
101e41f4b71Sopenharmony_ci
102e41f4b71Sopenharmony_ci## pointer.setPointerSpeedSync<sup>10+</sup>
103e41f4b71Sopenharmony_ci
104e41f4b71Sopenharmony_cisetPointerSpeedSync(speed: number): void
105e41f4b71Sopenharmony_ci
106e41f4b71Sopenharmony_ciSets the moving speed of the mouse pointer. This API returns the result synchronously.
107e41f4b71Sopenharmony_ci
108e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
109e41f4b71Sopenharmony_ci
110e41f4b71Sopenharmony_ci**System API**: This is a system API.
111e41f4b71Sopenharmony_ci
112e41f4b71Sopenharmony_ci**Parameters**
113e41f4b71Sopenharmony_ci
114e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
115e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
116e41f4b71Sopenharmony_ci| speed | number | Yes   | Moving speed of the mouse pointer. The value ranges from **1** to **11**. The default value is **7**.|
117e41f4b71Sopenharmony_ci
118e41f4b71Sopenharmony_ci**Error codes**
119e41f4b71Sopenharmony_ci
120e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
121e41f4b71Sopenharmony_ci
122e41f4b71Sopenharmony_ci| ID | Error Message            |
123e41f4b71Sopenharmony_ci| ---- | --------------------- |
124e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
125e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
126e41f4b71Sopenharmony_ci
127e41f4b71Sopenharmony_ci**Example**
128e41f4b71Sopenharmony_ci
129e41f4b71Sopenharmony_ci```js
130e41f4b71Sopenharmony_citry {
131e41f4b71Sopenharmony_ci  let speed = pointer.setPointerSpeedSync(5);
132e41f4b71Sopenharmony_ci  console.log(`Set pointer speed success`);
133e41f4b71Sopenharmony_ci} catch (error) {
134e41f4b71Sopenharmony_ci  console.log(`Set pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
135e41f4b71Sopenharmony_ci}
136e41f4b71Sopenharmony_ci```
137e41f4b71Sopenharmony_ci
138e41f4b71Sopenharmony_ci## pointer.getPointerSpeed
139e41f4b71Sopenharmony_ci
140e41f4b71Sopenharmony_cigetPointerSpeed(callback: AsyncCallback&lt;number&gt;): void
141e41f4b71Sopenharmony_ci
142e41f4b71Sopenharmony_ciObtains the moving speed of the mouse pointer. This API uses an asynchronous callback to return the result.
143e41f4b71Sopenharmony_ci
144e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
145e41f4b71Sopenharmony_ci
146e41f4b71Sopenharmony_ci**System API**: This is a system API.
147e41f4b71Sopenharmony_ci
148e41f4b71Sopenharmony_ci**Parameters**
149e41f4b71Sopenharmony_ci
150e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
151e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
152e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;number&gt; | Yes   | Callback used to return the result.|
153e41f4b71Sopenharmony_ci
154e41f4b71Sopenharmony_ci**Error codes**
155e41f4b71Sopenharmony_ci
156e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
157e41f4b71Sopenharmony_ci
158e41f4b71Sopenharmony_ci| ID | Error Message            |
159e41f4b71Sopenharmony_ci| ---- | --------------------- |
160e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
161e41f4b71Sopenharmony_ci
162e41f4b71Sopenharmony_ci
163e41f4b71Sopenharmony_ci**Example**
164e41f4b71Sopenharmony_ci
165e41f4b71Sopenharmony_ci```js
166e41f4b71Sopenharmony_citry {
167e41f4b71Sopenharmony_ci  pointer.getPointerSpeed((error: Error, speed: number) => {
168e41f4b71Sopenharmony_ci    if (error) {
169e41f4b71Sopenharmony_ci      console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
170e41f4b71Sopenharmony_ci      return;
171e41f4b71Sopenharmony_ci    }
172e41f4b71Sopenharmony_ci    console.log(`Get pointer speed success, speed: ${JSON.stringify(speed)}`);
173e41f4b71Sopenharmony_ci  });
174e41f4b71Sopenharmony_ci} catch (error) {
175e41f4b71Sopenharmony_ci  console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
176e41f4b71Sopenharmony_ci}
177e41f4b71Sopenharmony_ci```
178e41f4b71Sopenharmony_ci
179e41f4b71Sopenharmony_ci## pointer.getPointerSpeed
180e41f4b71Sopenharmony_ci
181e41f4b71Sopenharmony_cigetPointerSpeed(): Promise&lt;number&gt;
182e41f4b71Sopenharmony_ci
183e41f4b71Sopenharmony_ciObtains the moving speed of the mouse pointer. This API uses a promise to return the result.
184e41f4b71Sopenharmony_ci
185e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
186e41f4b71Sopenharmony_ci
187e41f4b71Sopenharmony_ci**System API**: This is a system API.
188e41f4b71Sopenharmony_ci
189e41f4b71Sopenharmony_ci**Return value**
190e41f4b71Sopenharmony_ci
191e41f4b71Sopenharmony_ci| Name                   | Description                 |
192e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
193e41f4b71Sopenharmony_ci| Promise&lt;number&gt; | Promise used to return the result.|
194e41f4b71Sopenharmony_ci
195e41f4b71Sopenharmony_ci**Example**
196e41f4b71Sopenharmony_ci
197e41f4b71Sopenharmony_ci```js
198e41f4b71Sopenharmony_citry {
199e41f4b71Sopenharmony_ci  pointer.getPointerSpeed().then(speed => {
200e41f4b71Sopenharmony_ci    console.log(`Get pointer speed success, speed: ${JSON.stringify(speed)}`);
201e41f4b71Sopenharmony_ci  });
202e41f4b71Sopenharmony_ci} catch (error) {
203e41f4b71Sopenharmony_ci  console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
204e41f4b71Sopenharmony_ci}
205e41f4b71Sopenharmony_ci```
206e41f4b71Sopenharmony_ci
207e41f4b71Sopenharmony_ci## pointer.getPointerSpeedSync<sup>10+</sup>
208e41f4b71Sopenharmony_ci
209e41f4b71Sopenharmony_cigetPointerSpeedSync(): number
210e41f4b71Sopenharmony_ci
211e41f4b71Sopenharmony_ciObtains the moving speed of the mouse pointer. This API returns the result synchronously.
212e41f4b71Sopenharmony_ci
213e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
214e41f4b71Sopenharmony_ci
215e41f4b71Sopenharmony_ci**System API**: This is a system API.
216e41f4b71Sopenharmony_ci
217e41f4b71Sopenharmony_ci**Return value**
218e41f4b71Sopenharmony_ci
219e41f4b71Sopenharmony_ci| Name                   | Description                 |
220e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
221e41f4b71Sopenharmony_ci| number | Moving speed of the mouse pointer.|
222e41f4b71Sopenharmony_ci
223e41f4b71Sopenharmony_ci**Error codes**
224e41f4b71Sopenharmony_ci
225e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
226e41f4b71Sopenharmony_ci
227e41f4b71Sopenharmony_ci| ID | Error Message            |
228e41f4b71Sopenharmony_ci| ---- | --------------------- |
229e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
230e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
231e41f4b71Sopenharmony_ci
232e41f4b71Sopenharmony_ci**Example**
233e41f4b71Sopenharmony_ci
234e41f4b71Sopenharmony_ci```js
235e41f4b71Sopenharmony_citry {
236e41f4b71Sopenharmony_ci  let speed = pointer.getPointerSpeedSync();
237e41f4b71Sopenharmony_ci  console.log(`Get pointer speed success, speed: ${JSON.stringify(speed)}`);
238e41f4b71Sopenharmony_ci} catch (error) {
239e41f4b71Sopenharmony_ci  console.log(`Get pointer speed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
240e41f4b71Sopenharmony_ci}
241e41f4b71Sopenharmony_ci```
242e41f4b71Sopenharmony_ci
243e41f4b71Sopenharmony_ci## pointer.setHoverScrollState<sup>10+</sup>
244e41f4b71Sopenharmony_ci
245e41f4b71Sopenharmony_cisetHoverScrollState(state: boolean, callback: AsyncCallback&lt;void&gt;): void
246e41f4b71Sopenharmony_ci
247e41f4b71Sopenharmony_ciSets the status of the mouse hover scroll switch. This API uses an asynchronous callback to return the result.
248e41f4b71Sopenharmony_ci
249e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
250e41f4b71Sopenharmony_ci
251e41f4b71Sopenharmony_ci**System API**: This is a system API.
252e41f4b71Sopenharmony_ci
253e41f4b71Sopenharmony_ci**Parameters**
254e41f4b71Sopenharmony_ci
255e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
256e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
257e41f4b71Sopenharmony_ci| state    | boolean                    | Yes   | Status of the mouse hover scroll switch. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite.  |
258e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;void&gt; | Yes   | Callback used to return the result.|
259e41f4b71Sopenharmony_ci
260e41f4b71Sopenharmony_ci**Error codes**
261e41f4b71Sopenharmony_ci
262e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
263e41f4b71Sopenharmony_ci
264e41f4b71Sopenharmony_ci| ID | Error Message            |
265e41f4b71Sopenharmony_ci| ---- | --------------------- |
266e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
267e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
268e41f4b71Sopenharmony_ci
269e41f4b71Sopenharmony_ci**Example**
270e41f4b71Sopenharmony_ci
271e41f4b71Sopenharmony_ci```js
272e41f4b71Sopenharmony_citry {
273e41f4b71Sopenharmony_ci  pointer.setHoverScrollState(true, (error: Error) => {
274e41f4b71Sopenharmony_ci    if (error) {
275e41f4b71Sopenharmony_ci      console.log(`Set the mouse hover scroll failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
276e41f4b71Sopenharmony_ci      return;
277e41f4b71Sopenharmony_ci    }
278e41f4b71Sopenharmony_ci    console.log(`Set the mouse hover scroll success`);
279e41f4b71Sopenharmony_ci  });
280e41f4b71Sopenharmony_ci} catch (error) {
281e41f4b71Sopenharmony_ci  console.log(`Set the mouse hover scroll failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
282e41f4b71Sopenharmony_ci}
283e41f4b71Sopenharmony_ci```
284e41f4b71Sopenharmony_ci
285e41f4b71Sopenharmony_ci## pointer.setHoverScrollState<sup>10+</sup>
286e41f4b71Sopenharmony_ci
287e41f4b71Sopenharmony_cisetHoverScrollState(state: boolean): Promise&lt;void&gt;
288e41f4b71Sopenharmony_ci
289e41f4b71Sopenharmony_ciSets the status of the mouse hover scroll switch. This API uses a promise to return the result.
290e41f4b71Sopenharmony_ci
291e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
292e41f4b71Sopenharmony_ci
293e41f4b71Sopenharmony_ci**System API**: This is a system API.
294e41f4b71Sopenharmony_ci
295e41f4b71Sopenharmony_ci**Parameters**
296e41f4b71Sopenharmony_ci
297e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
298e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
299e41f4b71Sopenharmony_ci| state | boolean | Yes   | Status of the mouse hover scroll switch. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite.|
300e41f4b71Sopenharmony_ci
301e41f4b71Sopenharmony_ci**Return value**
302e41f4b71Sopenharmony_ci
303e41f4b71Sopenharmony_ci| Name                 | Description              |
304e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
305e41f4b71Sopenharmony_ci| Promise&lt;void&gt; | Promise used to return the result.|
306e41f4b71Sopenharmony_ci
307e41f4b71Sopenharmony_ci**Error codes**
308e41f4b71Sopenharmony_ci
309e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
310e41f4b71Sopenharmony_ci
311e41f4b71Sopenharmony_ci| ID | Error Message            |
312e41f4b71Sopenharmony_ci| ---- | --------------------- |
313e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
314e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
315e41f4b71Sopenharmony_ci
316e41f4b71Sopenharmony_ci**Example**
317e41f4b71Sopenharmony_ci
318e41f4b71Sopenharmony_ci```js
319e41f4b71Sopenharmony_citry {
320e41f4b71Sopenharmony_ci  pointer.setHoverScrollState(true).then(() => {
321e41f4b71Sopenharmony_ci    console.log(`Set the mouse hover scroll success`);
322e41f4b71Sopenharmony_ci  });
323e41f4b71Sopenharmony_ci} catch (error) {
324e41f4b71Sopenharmony_ci  console.log(`Set the mouse hover scroll failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
325e41f4b71Sopenharmony_ci}
326e41f4b71Sopenharmony_ci```
327e41f4b71Sopenharmony_ci
328e41f4b71Sopenharmony_ci## pointer.getHoverScrollState<sup>10+</sup>
329e41f4b71Sopenharmony_ci
330e41f4b71Sopenharmony_cigetHoverScrollState(callback: AsyncCallback&lt;boolean&gt;): void
331e41f4b71Sopenharmony_ci
332e41f4b71Sopenharmony_ciObtains the status of the mouse hover scroll switch. This API uses an asynchronous callback to return the result.
333e41f4b71Sopenharmony_ci
334e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
335e41f4b71Sopenharmony_ci
336e41f4b71Sopenharmony_ci**System API**: This is a system API.
337e41f4b71Sopenharmony_ci
338e41f4b71Sopenharmony_ci**Parameters**
339e41f4b71Sopenharmony_ci
340e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
341e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
342e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;boolean&gt; | Yes   | Callback used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite.|
343e41f4b71Sopenharmony_ci
344e41f4b71Sopenharmony_ci**Error codes**
345e41f4b71Sopenharmony_ci
346e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
347e41f4b71Sopenharmony_ci
348e41f4b71Sopenharmony_ci| ID | Error Message            |
349e41f4b71Sopenharmony_ci| ---- | --------------------- |
350e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
351e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
352e41f4b71Sopenharmony_ci
353e41f4b71Sopenharmony_ci**Example**
354e41f4b71Sopenharmony_ci
355e41f4b71Sopenharmony_ci```js
356e41f4b71Sopenharmony_citry {
357e41f4b71Sopenharmony_ci  pointer.getHoverScrollState((error: Error, state: boolean) => {
358e41f4b71Sopenharmony_ci    console.log(`Get the mouse hover scroll success, state: ${JSON.stringify(state)}`);
359e41f4b71Sopenharmony_ci  });
360e41f4b71Sopenharmony_ci} catch (error) {
361e41f4b71Sopenharmony_ci  console.log(`Get the mouse hover scroll failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
362e41f4b71Sopenharmony_ci}
363e41f4b71Sopenharmony_ci```
364e41f4b71Sopenharmony_ci
365e41f4b71Sopenharmony_ci## pointer.getHoverScrollState<sup>10+</sup>
366e41f4b71Sopenharmony_ci
367e41f4b71Sopenharmony_cigetHoverScrollState(): Promise&lt;boolean&gt;
368e41f4b71Sopenharmony_ci
369e41f4b71Sopenharmony_ciObtains the status of the mouse hover scroll switch. This API uses a promise to return the result.
370e41f4b71Sopenharmony_ci
371e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
372e41f4b71Sopenharmony_ci
373e41f4b71Sopenharmony_ci**System API**: This is a system API.
374e41f4b71Sopenharmony_ci
375e41f4b71Sopenharmony_ci**Return value**
376e41f4b71Sopenharmony_ci
377e41f4b71Sopenharmony_ci| Name                   | Description                 |
378e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
379e41f4b71Sopenharmony_ci| Promise&lt;boolean&gt; | Promise used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite.|
380e41f4b71Sopenharmony_ci
381e41f4b71Sopenharmony_ci**Error codes**
382e41f4b71Sopenharmony_ci
383e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
384e41f4b71Sopenharmony_ci
385e41f4b71Sopenharmony_ci| ID | Error Message            |
386e41f4b71Sopenharmony_ci| ---- | --------------------- |
387e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
388e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
389e41f4b71Sopenharmony_ci
390e41f4b71Sopenharmony_ci**Example**
391e41f4b71Sopenharmony_ci
392e41f4b71Sopenharmony_ci```js
393e41f4b71Sopenharmony_citry {
394e41f4b71Sopenharmony_ci  pointer.getHoverScrollState().then((state: boolean) => {
395e41f4b71Sopenharmony_ci    console.log(`Get the mouse hover scroll success, state: ${JSON.stringify(state)}`);
396e41f4b71Sopenharmony_ci  });
397e41f4b71Sopenharmony_ci} catch (error) {
398e41f4b71Sopenharmony_ci  console.log(`Get the mouse hover scroll failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
399e41f4b71Sopenharmony_ci}
400e41f4b71Sopenharmony_ci```
401e41f4b71Sopenharmony_ci
402e41f4b71Sopenharmony_ci## pointer.setMousePrimaryButton<sup>10+</sup>
403e41f4b71Sopenharmony_ci
404e41f4b71Sopenharmony_cisetMousePrimaryButton(primary: PrimaryButton, callback: AsyncCallback&lt;void&gt;): void
405e41f4b71Sopenharmony_ci
406e41f4b71Sopenharmony_ciSets the primary button of the mouse. This API uses an asynchronous callback to return the result.
407e41f4b71Sopenharmony_ci
408e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
409e41f4b71Sopenharmony_ci
410e41f4b71Sopenharmony_ci**System API**: This is a system API.
411e41f4b71Sopenharmony_ci
412e41f4b71Sopenharmony_ci**Parameters**
413e41f4b71Sopenharmony_ci
414e41f4b71Sopenharmony_ci| Name   | Type                     | Mandatory | Description                                   |
415e41f4b71Sopenharmony_ci| -------- | ------------------------- | ----  | ------------------------------------- |
416e41f4b71Sopenharmony_ci| primary  | [PrimaryButton](js-apis-pointer.md#primarybutton10)   | Yes   | ID of the primary mouse button.  |
417e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;void&gt; | Yes   | Callback used to return the result.|
418e41f4b71Sopenharmony_ci
419e41f4b71Sopenharmony_ci**Error codes**
420e41f4b71Sopenharmony_ci
421e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
422e41f4b71Sopenharmony_ci
423e41f4b71Sopenharmony_ci| ID | Error Message            |
424e41f4b71Sopenharmony_ci| ---- | --------------------- |
425e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
426e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
427e41f4b71Sopenharmony_ci
428e41f4b71Sopenharmony_ci**Example**
429e41f4b71Sopenharmony_ci
430e41f4b71Sopenharmony_ci```js
431e41f4b71Sopenharmony_citry {
432e41f4b71Sopenharmony_ci  pointer.setMousePrimaryButton(pointer.PrimaryButton.RIGHT, (error: Error) => {
433e41f4b71Sopenharmony_ci    if (error) {
434e41f4b71Sopenharmony_ci      console.log(`Set mouse primary button failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
435e41f4b71Sopenharmony_ci      return;
436e41f4b71Sopenharmony_ci    }
437e41f4b71Sopenharmony_ci    console.log(`Set mouse primary button success`);
438e41f4b71Sopenharmony_ci  });
439e41f4b71Sopenharmony_ci} catch (error) {
440e41f4b71Sopenharmony_ci  console.log(`Set mouse primary button failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
441e41f4b71Sopenharmony_ci}
442e41f4b71Sopenharmony_ci```
443e41f4b71Sopenharmony_ci
444e41f4b71Sopenharmony_ci## pointer.setMousePrimaryButton<sup>10+</sup>
445e41f4b71Sopenharmony_ci
446e41f4b71Sopenharmony_cisetMousePrimaryButton(primary: PrimaryButton): Promise&lt;void&gt;
447e41f4b71Sopenharmony_ci
448e41f4b71Sopenharmony_ciSets the primary button of the mouse. This API uses a promise to return the result.
449e41f4b71Sopenharmony_ci
450e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
451e41f4b71Sopenharmony_ci
452e41f4b71Sopenharmony_ci**System API**: This is a system API.
453e41f4b71Sopenharmony_ci
454e41f4b71Sopenharmony_ci**Parameters**
455e41f4b71Sopenharmony_ci
456e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
457e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
458e41f4b71Sopenharmony_ci| primary | [PrimaryButton](js-apis-pointer.md#primarybutton10) | Yes   | ID of the primary mouse button.|
459e41f4b71Sopenharmony_ci
460e41f4b71Sopenharmony_ci**Return value**
461e41f4b71Sopenharmony_ci
462e41f4b71Sopenharmony_ci| Name                 | Description              |
463e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
464e41f4b71Sopenharmony_ci| Promise&lt;void&gt; | Promise used to return the result.|
465e41f4b71Sopenharmony_ci
466e41f4b71Sopenharmony_ci**Error codes**
467e41f4b71Sopenharmony_ci
468e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
469e41f4b71Sopenharmony_ci
470e41f4b71Sopenharmony_ci| ID | Error Message            |
471e41f4b71Sopenharmony_ci| ---- | --------------------- |
472e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
473e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
474e41f4b71Sopenharmony_ci
475e41f4b71Sopenharmony_ci**Example**
476e41f4b71Sopenharmony_ci
477e41f4b71Sopenharmony_ci```js
478e41f4b71Sopenharmony_citry {
479e41f4b71Sopenharmony_ci  pointer.setMousePrimaryButton(pointer.PrimaryButton.RIGHT).then(() => {
480e41f4b71Sopenharmony_ci    console.log(`Set mouse primary button success`);
481e41f4b71Sopenharmony_ci  });
482e41f4b71Sopenharmony_ci} catch (error) {
483e41f4b71Sopenharmony_ci  console.log(`Set mouse primary button failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
484e41f4b71Sopenharmony_ci}
485e41f4b71Sopenharmony_ci```
486e41f4b71Sopenharmony_ci
487e41f4b71Sopenharmony_ci## pointer.getMousePrimaryButton<sup>10+</sup>
488e41f4b71Sopenharmony_ci
489e41f4b71Sopenharmony_cigetMousePrimaryButton(callback: AsyncCallback&lt;PrimaryButton&gt;): void
490e41f4b71Sopenharmony_ci
491e41f4b71Sopenharmony_ciObtains the primary button of the mouse. This API uses an asynchronous callback to return the result.
492e41f4b71Sopenharmony_ci
493e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
494e41f4b71Sopenharmony_ci
495e41f4b71Sopenharmony_ci**System API**: This is a system API.
496e41f4b71Sopenharmony_ci
497e41f4b71Sopenharmony_ci**Parameters**
498e41f4b71Sopenharmony_ci
499e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
500e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
501e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;[PrimaryButton](js-apis-pointer.md#primarybutton10)&gt; | Yes   | Callback used to return the result.|
502e41f4b71Sopenharmony_ci
503e41f4b71Sopenharmony_ci**Error codes**
504e41f4b71Sopenharmony_ci
505e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
506e41f4b71Sopenharmony_ci
507e41f4b71Sopenharmony_ci| ID | Error Message            |
508e41f4b71Sopenharmony_ci| ---- | --------------------- |
509e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
510e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
511e41f4b71Sopenharmony_ci
512e41f4b71Sopenharmony_ci**Example**
513e41f4b71Sopenharmony_ci
514e41f4b71Sopenharmony_ci```js
515e41f4b71Sopenharmony_citry {
516e41f4b71Sopenharmony_ci  pointer.getMousePrimaryButton((error: Error, primary: pointer.PrimaryButton) => {
517e41f4b71Sopenharmony_ci    console.log(`Get mouse primary button success, primary: ${JSON.stringify(primary)}`);
518e41f4b71Sopenharmony_ci  });
519e41f4b71Sopenharmony_ci} catch (error) {
520e41f4b71Sopenharmony_ci  console.log(`Get mouse primary button failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
521e41f4b71Sopenharmony_ci}
522e41f4b71Sopenharmony_ci```
523e41f4b71Sopenharmony_ci
524e41f4b71Sopenharmony_ci## pointer.getMousePrimaryButton<sup>10+</sup>
525e41f4b71Sopenharmony_ci
526e41f4b71Sopenharmony_cigetMousePrimaryButton(): Promise&lt;PrimaryButton&gt;
527e41f4b71Sopenharmony_ci
528e41f4b71Sopenharmony_ciObtains the primary button of the mouse. This API uses a promise to return the result.
529e41f4b71Sopenharmony_ci
530e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
531e41f4b71Sopenharmony_ci
532e41f4b71Sopenharmony_ci**System API**: This is a system API.
533e41f4b71Sopenharmony_ci
534e41f4b71Sopenharmony_ci**Return value**
535e41f4b71Sopenharmony_ci
536e41f4b71Sopenharmony_ci| Name                   | Description                 |
537e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
538e41f4b71Sopenharmony_ci| Promise&lt;[PrimaryButton](js-apis-pointer.md#primarybutton10)&gt; | Promise used to return the result.|
539e41f4b71Sopenharmony_ci
540e41f4b71Sopenharmony_ci**Error codes**
541e41f4b71Sopenharmony_ci
542e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
543e41f4b71Sopenharmony_ci
544e41f4b71Sopenharmony_ci| ID | Error Message            |
545e41f4b71Sopenharmony_ci| ---- | --------------------- |
546e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
547e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
548e41f4b71Sopenharmony_ci
549e41f4b71Sopenharmony_ci**Example**
550e41f4b71Sopenharmony_ci
551e41f4b71Sopenharmony_ci```js
552e41f4b71Sopenharmony_citry {
553e41f4b71Sopenharmony_ci  pointer.getMousePrimaryButton().then((primary: pointer.PrimaryButton) => {
554e41f4b71Sopenharmony_ci    console.log(`Get mouse primary button success, primary: ${JSON.stringify(primary)}`);
555e41f4b71Sopenharmony_ci  });
556e41f4b71Sopenharmony_ci} catch (error) {
557e41f4b71Sopenharmony_ci  console.log(`Get mouse primary button failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
558e41f4b71Sopenharmony_ci}
559e41f4b71Sopenharmony_ci```
560e41f4b71Sopenharmony_ci
561e41f4b71Sopenharmony_ci## pointer.setMouseScrollRows<sup>10+</sup>
562e41f4b71Sopenharmony_ci
563e41f4b71Sopenharmony_cisetMouseScrollRows(rows: number, callback: AsyncCallback&lt;void&gt;): void
564e41f4b71Sopenharmony_ci
565e41f4b71Sopenharmony_ciSets the number of mouse scroll rows. This API uses an asynchronous callback to return the result.
566e41f4b71Sopenharmony_ci
567e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
568e41f4b71Sopenharmony_ci
569e41f4b71Sopenharmony_ci**System API**: This is a system API.
570e41f4b71Sopenharmony_ci
571e41f4b71Sopenharmony_ci**Parameters**
572e41f4b71Sopenharmony_ci
573e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
574e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
575e41f4b71Sopenharmony_ci| rows     | number                    | Yes   | Number of mouse scroll rows. The value ranges from 1 to 100. The default value is **3**.  |
576e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;void&gt; | Yes   | Callback used to return the result.|
577e41f4b71Sopenharmony_ci
578e41f4b71Sopenharmony_ci**Error codes**
579e41f4b71Sopenharmony_ci
580e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
581e41f4b71Sopenharmony_ci
582e41f4b71Sopenharmony_ci| ID | Error Message            |
583e41f4b71Sopenharmony_ci| ---- | --------------------- |
584e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
585e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
586e41f4b71Sopenharmony_ci
587e41f4b71Sopenharmony_ci**Example**
588e41f4b71Sopenharmony_ci
589e41f4b71Sopenharmony_ci```js
590e41f4b71Sopenharmony_citry {
591e41f4b71Sopenharmony_ci  pointer.setMouseScrollRows(1, (error: Error) => {
592e41f4b71Sopenharmony_ci    if (error) {
593e41f4b71Sopenharmony_ci      console.log(`setMouseScrollRows failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
594e41f4b71Sopenharmony_ci      return;
595e41f4b71Sopenharmony_ci    }
596e41f4b71Sopenharmony_ci    console.log(`setMouseScrollRows success`);
597e41f4b71Sopenharmony_ci  });
598e41f4b71Sopenharmony_ci} catch (error) {
599e41f4b71Sopenharmony_ci  console.log(`setMouseScrollRows failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
600e41f4b71Sopenharmony_ci}
601e41f4b71Sopenharmony_ci```
602e41f4b71Sopenharmony_ci
603e41f4b71Sopenharmony_ci## pointer.setMouseScrollRows<sup>10+</sup>
604e41f4b71Sopenharmony_ci
605e41f4b71Sopenharmony_cisetMouseScrollRows(rows: number): Promise&lt;void&gt;
606e41f4b71Sopenharmony_ci
607e41f4b71Sopenharmony_ciSets the number of mouse scroll rows. This API uses a promise to return the result.
608e41f4b71Sopenharmony_ci
609e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
610e41f4b71Sopenharmony_ci
611e41f4b71Sopenharmony_ci**System API**: This is a system API.
612e41f4b71Sopenharmony_ci
613e41f4b71Sopenharmony_ci**Parameters**
614e41f4b71Sopenharmony_ci
615e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
616e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
617e41f4b71Sopenharmony_ci| rows  | number | Yes   | Number of mouse scroll rows. The value ranges from 1 to 100. The default value is **3**.|
618e41f4b71Sopenharmony_ci
619e41f4b71Sopenharmony_ci**Return value**
620e41f4b71Sopenharmony_ci
621e41f4b71Sopenharmony_ci| Name                 | Description              |
622e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
623e41f4b71Sopenharmony_ci| Promise&lt;void&gt; | Promise used to return the result.|
624e41f4b71Sopenharmony_ci
625e41f4b71Sopenharmony_ci**Error codes**
626e41f4b71Sopenharmony_ci
627e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
628e41f4b71Sopenharmony_ci
629e41f4b71Sopenharmony_ci| ID | Error Message            |
630e41f4b71Sopenharmony_ci| ---- | --------------------- |
631e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
632e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
633e41f4b71Sopenharmony_ci
634e41f4b71Sopenharmony_ci**Example**
635e41f4b71Sopenharmony_ci
636e41f4b71Sopenharmony_ci```js
637e41f4b71Sopenharmony_citry {
638e41f4b71Sopenharmony_ci  pointer.setMouseScrollRows(20).then(() => {
639e41f4b71Sopenharmony_ci    console.log(`setMouseScrollRows success`);
640e41f4b71Sopenharmony_ci  });
641e41f4b71Sopenharmony_ci} catch (error) {
642e41f4b71Sopenharmony_ci  console.log(`setMouseScrollRows failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
643e41f4b71Sopenharmony_ci}
644e41f4b71Sopenharmony_ci```
645e41f4b71Sopenharmony_ci
646e41f4b71Sopenharmony_ci## pointer.getMouseScrollRows<sup>10+</sup>
647e41f4b71Sopenharmony_ci
648e41f4b71Sopenharmony_cigetMouseScrollRows(callback: AsyncCallback&lt;number&gt;): void
649e41f4b71Sopenharmony_ci
650e41f4b71Sopenharmony_ciObtains the number of mouse scroll rows. This API uses an asynchronous callback to return the result.
651e41f4b71Sopenharmony_ci
652e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
653e41f4b71Sopenharmony_ci
654e41f4b71Sopenharmony_ci**System API**: This is a system API.
655e41f4b71Sopenharmony_ci
656e41f4b71Sopenharmony_ci**Parameters**
657e41f4b71Sopenharmony_ci
658e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
659e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
660e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;number&gt; | Yes   | Callback used to return the result.|
661e41f4b71Sopenharmony_ci
662e41f4b71Sopenharmony_ci**Error codes**
663e41f4b71Sopenharmony_ci
664e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
665e41f4b71Sopenharmony_ci
666e41f4b71Sopenharmony_ci| ID | Error Message            |
667e41f4b71Sopenharmony_ci| ---- | --------------------- |
668e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
669e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
670e41f4b71Sopenharmony_ci
671e41f4b71Sopenharmony_ci**Example**
672e41f4b71Sopenharmony_ci
673e41f4b71Sopenharmony_ci```js
674e41f4b71Sopenharmony_citry {
675e41f4b71Sopenharmony_ci  pointer.getMouseScrollRows((error: Error, rows: number) => {
676e41f4b71Sopenharmony_ci    console.log(`getMouseScrollRows success, rows: ${JSON.stringify(rows)}`);
677e41f4b71Sopenharmony_ci  });
678e41f4b71Sopenharmony_ci} catch (error) {
679e41f4b71Sopenharmony_ci  console.log(`getMouseScrollRows failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
680e41f4b71Sopenharmony_ci}
681e41f4b71Sopenharmony_ci```
682e41f4b71Sopenharmony_ci
683e41f4b71Sopenharmony_ci## pointer.getMouseScrollRows<sup>10+</sup>
684e41f4b71Sopenharmony_ci
685e41f4b71Sopenharmony_cigetMouseScrollRows(): Promise&lt;number&gt;
686e41f4b71Sopenharmony_ci
687e41f4b71Sopenharmony_ciObtains the moving speed of the mouse pointer. This API uses a promise to return the result.
688e41f4b71Sopenharmony_ci
689e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
690e41f4b71Sopenharmony_ci
691e41f4b71Sopenharmony_ci**System API**: This is a system API.
692e41f4b71Sopenharmony_ci
693e41f4b71Sopenharmony_ci**Return value**
694e41f4b71Sopenharmony_ci
695e41f4b71Sopenharmony_ci| Name                   | Description                 |
696e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
697e41f4b71Sopenharmony_ci| Promise&lt;number&gt; | Promise used to return the result.|
698e41f4b71Sopenharmony_ci
699e41f4b71Sopenharmony_ci**Error codes**
700e41f4b71Sopenharmony_ci
701e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
702e41f4b71Sopenharmony_ci
703e41f4b71Sopenharmony_ci| ID | Error Message            |
704e41f4b71Sopenharmony_ci| ---- | --------------------- |
705e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
706e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
707e41f4b71Sopenharmony_ci
708e41f4b71Sopenharmony_ci**Example**
709e41f4b71Sopenharmony_ci
710e41f4b71Sopenharmony_ci```js
711e41f4b71Sopenharmony_citry {
712e41f4b71Sopenharmony_ci  pointer.getMouseScrollRows().then((rows: number) => {
713e41f4b71Sopenharmony_ci    console.log(`getMouseScrollRows success, rows: ${JSON.stringify(rows)}`);
714e41f4b71Sopenharmony_ci  });
715e41f4b71Sopenharmony_ci} catch (error) {
716e41f4b71Sopenharmony_ci  console.log(`getMouseScrollRows failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
717e41f4b71Sopenharmony_ci}
718e41f4b71Sopenharmony_ci```
719e41f4b71Sopenharmony_ci
720e41f4b71Sopenharmony_ci## pointer.setTouchpadScrollSwitch<sup>10+</sup>
721e41f4b71Sopenharmony_ci
722e41f4b71Sopenharmony_cisetTouchpadScrollSwitch(state: boolean, callback: AsyncCallback\<void>): void
723e41f4b71Sopenharmony_ci
724e41f4b71Sopenharmony_ciSets the scroll switch of the touchpad. This API uses an asynchronous callback to return the result.
725e41f4b71Sopenharmony_ci
726e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
727e41f4b71Sopenharmony_ci
728e41f4b71Sopenharmony_ci**System API**: This is a system API.
729e41f4b71Sopenharmony_ci
730e41f4b71Sopenharmony_ci**Parameters**
731e41f4b71Sopenharmony_ci
732e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
733e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
734e41f4b71Sopenharmony_ci| state | boolean | Yes   | Scroll switch status. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.  |
735e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void> | Yes   | Callback used to return the result.|
736e41f4b71Sopenharmony_ci
737e41f4b71Sopenharmony_ci**Error codes**
738e41f4b71Sopenharmony_ci
739e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
740e41f4b71Sopenharmony_ci
741e41f4b71Sopenharmony_ci| ID | Error Message            |
742e41f4b71Sopenharmony_ci| ---- | --------------------- |
743e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
744e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
745e41f4b71Sopenharmony_ci
746e41f4b71Sopenharmony_ci**Example**
747e41f4b71Sopenharmony_ci
748e41f4b71Sopenharmony_ci```js
749e41f4b71Sopenharmony_citry {
750e41f4b71Sopenharmony_ci  pointer.setTouchpadScrollSwitch(true, (error: Error) => {
751e41f4b71Sopenharmony_ci    if (error) {
752e41f4b71Sopenharmony_ci      console.log(`setTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
753e41f4b71Sopenharmony_ci      return;
754e41f4b71Sopenharmony_ci    }
755e41f4b71Sopenharmony_ci    console.log(`setTouchpadScrollSwitch success`);
756e41f4b71Sopenharmony_ci  });
757e41f4b71Sopenharmony_ci} catch (error) {
758e41f4b71Sopenharmony_ci  console.log(`setTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
759e41f4b71Sopenharmony_ci}
760e41f4b71Sopenharmony_ci```
761e41f4b71Sopenharmony_ci
762e41f4b71Sopenharmony_ci## pointer.setTouchpadScrollSwitch<sup>10+</sup>
763e41f4b71Sopenharmony_ci
764e41f4b71Sopenharmony_cisetTouchpadScrollSwitch(state: boolean): Promise\<void>
765e41f4b71Sopenharmony_ci
766e41f4b71Sopenharmony_ciSets the scroll switch of the touchpad. This API uses a promise to return the result.
767e41f4b71Sopenharmony_ci
768e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
769e41f4b71Sopenharmony_ci
770e41f4b71Sopenharmony_ci**System API**: This is a system API.
771e41f4b71Sopenharmony_ci
772e41f4b71Sopenharmony_ci**Parameters**
773e41f4b71Sopenharmony_ci
774e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
775e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
776e41f4b71Sopenharmony_ci| state | boolean| Yes   |  Scroll switch status. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
777e41f4b71Sopenharmony_ci
778e41f4b71Sopenharmony_ci**Return value**
779e41f4b71Sopenharmony_ci
780e41f4b71Sopenharmony_ci| Name                 | Description              |
781e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
782e41f4b71Sopenharmony_ci| Promise\<void> | Promise used to return the result.|
783e41f4b71Sopenharmony_ci
784e41f4b71Sopenharmony_ci**Error codes**
785e41f4b71Sopenharmony_ci
786e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
787e41f4b71Sopenharmony_ci
788e41f4b71Sopenharmony_ci| ID | Error Message            |
789e41f4b71Sopenharmony_ci| ---- | --------------------- |
790e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
791e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
792e41f4b71Sopenharmony_ci
793e41f4b71Sopenharmony_ci**Example**
794e41f4b71Sopenharmony_ci
795e41f4b71Sopenharmony_ci```js
796e41f4b71Sopenharmony_citry {
797e41f4b71Sopenharmony_ci  pointer.setTouchpadScrollSwitch(false).then(() => {
798e41f4b71Sopenharmony_ci    console.log(`setTouchpadScrollSwitch success`);
799e41f4b71Sopenharmony_ci  });
800e41f4b71Sopenharmony_ci} catch (error) {
801e41f4b71Sopenharmony_ci  console.log(`setTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
802e41f4b71Sopenharmony_ci}
803e41f4b71Sopenharmony_ci```
804e41f4b71Sopenharmony_ci
805e41f4b71Sopenharmony_ci## pointer.getTouchpadScrollSwitch<sup>10+</sup>
806e41f4b71Sopenharmony_ci
807e41f4b71Sopenharmony_cigetTouchpadScrollSwitch(callback:  AsyncCallback\<boolean>): void
808e41f4b71Sopenharmony_ci
809e41f4b71Sopenharmony_ciObtains the scroll switch status of the touchpad. This API uses an asynchronous callback to return the result.
810e41f4b71Sopenharmony_ci
811e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
812e41f4b71Sopenharmony_ci
813e41f4b71Sopenharmony_ci**System API**: This is a system API.
814e41f4b71Sopenharmony_ci
815e41f4b71Sopenharmony_ci**Parameters**
816e41f4b71Sopenharmony_ci
817e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
818e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
819e41f4b71Sopenharmony_ci| callback | AsyncCallback\<boolean> | Yes   | Callback used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
820e41f4b71Sopenharmony_ci
821e41f4b71Sopenharmony_ci**Error codes**
822e41f4b71Sopenharmony_ci
823e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
824e41f4b71Sopenharmony_ci
825e41f4b71Sopenharmony_ci| ID | Error Message            |
826e41f4b71Sopenharmony_ci| ---- | --------------------- |
827e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
828e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
829e41f4b71Sopenharmony_ci
830e41f4b71Sopenharmony_ci**Example**
831e41f4b71Sopenharmony_ci
832e41f4b71Sopenharmony_ci```js
833e41f4b71Sopenharmony_citry {
834e41f4b71Sopenharmony_ci  pointer.getTouchpadScrollSwitch((error: Error, state: boolean) => {
835e41f4b71Sopenharmony_ci    console.log(`getTouchpadScrollSwitch success, state: ${JSON.stringify(state)}`);
836e41f4b71Sopenharmony_ci  });
837e41f4b71Sopenharmony_ci} catch (error) {
838e41f4b71Sopenharmony_ci  console.log(`getTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
839e41f4b71Sopenharmony_ci}
840e41f4b71Sopenharmony_ci```
841e41f4b71Sopenharmony_ci
842e41f4b71Sopenharmony_ci## pointer.getTouchpadScrollSwitch<sup>10+</sup>
843e41f4b71Sopenharmony_ci
844e41f4b71Sopenharmony_cigetTouchpadScrollSwitch(): Promise\<boolean>
845e41f4b71Sopenharmony_ci
846e41f4b71Sopenharmony_ciObtains the scroll switch status of the touchpad. This API uses a promise to return the result.
847e41f4b71Sopenharmony_ci
848e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
849e41f4b71Sopenharmony_ci
850e41f4b71Sopenharmony_ci**System API**: This is a system API.
851e41f4b71Sopenharmony_ci
852e41f4b71Sopenharmony_ci**Return value**
853e41f4b71Sopenharmony_ci
854e41f4b71Sopenharmony_ci| Name                   | Description                 |
855e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
856e41f4b71Sopenharmony_ci| Promise\<boolean> | Promise used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
857e41f4b71Sopenharmony_ci
858e41f4b71Sopenharmony_ci**Error codes**
859e41f4b71Sopenharmony_ci
860e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
861e41f4b71Sopenharmony_ci
862e41f4b71Sopenharmony_ci| ID | Error Message            |
863e41f4b71Sopenharmony_ci| ---- | --------------------- |
864e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
865e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
866e41f4b71Sopenharmony_ci
867e41f4b71Sopenharmony_ci**Example**
868e41f4b71Sopenharmony_ci
869e41f4b71Sopenharmony_ci```js
870e41f4b71Sopenharmony_citry {
871e41f4b71Sopenharmony_ci  pointer.getTouchpadScrollSwitch().then((state) => {
872e41f4b71Sopenharmony_ci    console.log(`getTouchpadScrollSwitch success, state: ${JSON.stringify(state)}`);
873e41f4b71Sopenharmony_ci  });
874e41f4b71Sopenharmony_ci} catch (error) {
875e41f4b71Sopenharmony_ci  console.log(`getTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
876e41f4b71Sopenharmony_ci}
877e41f4b71Sopenharmony_ci```
878e41f4b71Sopenharmony_ci
879e41f4b71Sopenharmony_ci## pointer.setTouchpadScrollDirection<sup>10+</sup>
880e41f4b71Sopenharmony_ci
881e41f4b71Sopenharmony_cisetTouchpadScrollDirection(state: boolean, callback: AsyncCallback\<void>): void
882e41f4b71Sopenharmony_ci
883e41f4b71Sopenharmony_ciSets the scroll direction of the touchpad. This API uses an asynchronous callback to return the result.
884e41f4b71Sopenharmony_ci
885e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
886e41f4b71Sopenharmony_ci
887e41f4b71Sopenharmony_ci**System API**: This is a system API.
888e41f4b71Sopenharmony_ci
889e41f4b71Sopenharmony_ci**Parameters**
890e41f4b71Sopenharmony_ci
891e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
892e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
893e41f4b71Sopenharmony_ci| state | boolean | Yes   | Scroll direction of the touchpad.<br>The value **true** indicates that the scroll direction is the same as the finger moving direction, and the value **false** indicates the opposite.<br>The default value is **true**.  |
894e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void> | Yes   | Callback used to return the result.|
895e41f4b71Sopenharmony_ci
896e41f4b71Sopenharmony_ci**Error codes**
897e41f4b71Sopenharmony_ci
898e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
899e41f4b71Sopenharmony_ci
900e41f4b71Sopenharmony_ci| ID | Error Message            |
901e41f4b71Sopenharmony_ci| ---- | --------------------- |
902e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
903e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
904e41f4b71Sopenharmony_ci
905e41f4b71Sopenharmony_ci**Example**
906e41f4b71Sopenharmony_ci
907e41f4b71Sopenharmony_ci```js
908e41f4b71Sopenharmony_citry {
909e41f4b71Sopenharmony_ci  pointer.setTouchpadScrollDirection(true, (error: Error) => {
910e41f4b71Sopenharmony_ci    if (error) {
911e41f4b71Sopenharmony_ci      console.log(`setTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
912e41f4b71Sopenharmony_ci      return;
913e41f4b71Sopenharmony_ci    }
914e41f4b71Sopenharmony_ci    console.log(`setTouchpadScrollDirection success`);
915e41f4b71Sopenharmony_ci  });
916e41f4b71Sopenharmony_ci} catch (error) {
917e41f4b71Sopenharmony_ci  console.log(`setTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
918e41f4b71Sopenharmony_ci}
919e41f4b71Sopenharmony_ci```
920e41f4b71Sopenharmony_ci
921e41f4b71Sopenharmony_ci## pointer.setTouchpadScrollDirection<sup>10+</sup>
922e41f4b71Sopenharmony_ci
923e41f4b71Sopenharmony_cisetTouchpadScrollDirection(state: boolean): Promise\<void>
924e41f4b71Sopenharmony_ci
925e41f4b71Sopenharmony_ciSets the scroll direction of the touchpad. This API uses a promise to return the result.
926e41f4b71Sopenharmony_ci
927e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
928e41f4b71Sopenharmony_ci
929e41f4b71Sopenharmony_ci**System API**: This is a system API.
930e41f4b71Sopenharmony_ci
931e41f4b71Sopenharmony_ci**Parameters**
932e41f4b71Sopenharmony_ci
933e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
934e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
935e41f4b71Sopenharmony_ci| state | boolean| Yes   |  Scroll direction of the touchpad.<br>The value **true** indicates that the scroll direction is the same as the finger moving direction, and the value **false** indicates the opposite.<br>The default value is **true**.|
936e41f4b71Sopenharmony_ci
937e41f4b71Sopenharmony_ci**Return value**
938e41f4b71Sopenharmony_ci
939e41f4b71Sopenharmony_ci| Name                 | Description              |
940e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
941e41f4b71Sopenharmony_ci| Promise\<void> | Promise used to return the result.|
942e41f4b71Sopenharmony_ci
943e41f4b71Sopenharmony_ci**Error codes**
944e41f4b71Sopenharmony_ci
945e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
946e41f4b71Sopenharmony_ci
947e41f4b71Sopenharmony_ci| ID | Error Message            |
948e41f4b71Sopenharmony_ci| ---- | --------------------- |
949e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
950e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
951e41f4b71Sopenharmony_ci
952e41f4b71Sopenharmony_ci**Example**
953e41f4b71Sopenharmony_ci
954e41f4b71Sopenharmony_ci```js
955e41f4b71Sopenharmony_citry {
956e41f4b71Sopenharmony_ci  pointer.setTouchpadScrollDirection (false).then(() => {
957e41f4b71Sopenharmony_ci    console.log(`setTouchpadScrollDirection success`);
958e41f4b71Sopenharmony_ci  });
959e41f4b71Sopenharmony_ci} catch (error) {
960e41f4b71Sopenharmony_ci  console.log(`setTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
961e41f4b71Sopenharmony_ci}
962e41f4b71Sopenharmony_ci```
963e41f4b71Sopenharmony_ci
964e41f4b71Sopenharmony_ci## pointer.getTouchpadScrollDirection<sup>10+</sup>
965e41f4b71Sopenharmony_ci
966e41f4b71Sopenharmony_cigetTouchpadScrollDirection(callback:  AsyncCallback\<boolean>): void
967e41f4b71Sopenharmony_ci
968e41f4b71Sopenharmony_ciObtains the scroll direction of the touchpad. This API uses an asynchronous callback to return the result.
969e41f4b71Sopenharmony_ci
970e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
971e41f4b71Sopenharmony_ci
972e41f4b71Sopenharmony_ci**System API**: This is a system API.
973e41f4b71Sopenharmony_ci
974e41f4b71Sopenharmony_ci**Parameters**
975e41f4b71Sopenharmony_ci
976e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
977e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
978e41f4b71Sopenharmony_ci| callback | AsyncCallback\<boolean> | Yes   | Callback used to return the result.<br>The value **true** indicates that the scroll direction is the same as the finger moving direction, and the value **false** indicates the opposite.<br>The default value is **true**.|
979e41f4b71Sopenharmony_ci
980e41f4b71Sopenharmony_ci**Error codes**
981e41f4b71Sopenharmony_ci
982e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
983e41f4b71Sopenharmony_ci
984e41f4b71Sopenharmony_ci| ID | Error Message            |
985e41f4b71Sopenharmony_ci| ---- | --------------------- |
986e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
987e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
988e41f4b71Sopenharmony_ci
989e41f4b71Sopenharmony_ci**Example**
990e41f4b71Sopenharmony_ci
991e41f4b71Sopenharmony_ci```js
992e41f4b71Sopenharmony_citry {
993e41f4b71Sopenharmony_ci  pointer.getTouchpadScrollDirection ((error: Error, state: boolean) => {
994e41f4b71Sopenharmony_ci    console.log(`getTouchpadScrollDirection success, state: ${JSON.stringify(state)}`);
995e41f4b71Sopenharmony_ci  });
996e41f4b71Sopenharmony_ci} catch (error) {
997e41f4b71Sopenharmony_ci  console.log(`getTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
998e41f4b71Sopenharmony_ci}
999e41f4b71Sopenharmony_ci```
1000e41f4b71Sopenharmony_ci
1001e41f4b71Sopenharmony_ci## pointer.getTouchpadScrollDirection<sup>10+</sup>
1002e41f4b71Sopenharmony_ci
1003e41f4b71Sopenharmony_cigetTouchpadScrollDirection(): Promise\<boolean>
1004e41f4b71Sopenharmony_ci
1005e41f4b71Sopenharmony_ciObtains the scroll direction of the touchpad. This API uses a promise to return the result.
1006e41f4b71Sopenharmony_ci
1007e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1008e41f4b71Sopenharmony_ci
1009e41f4b71Sopenharmony_ci**System API**: This is a system API.
1010e41f4b71Sopenharmony_ci
1011e41f4b71Sopenharmony_ci**Return value**
1012e41f4b71Sopenharmony_ci
1013e41f4b71Sopenharmony_ci| Name                   | Description                 |
1014e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
1015e41f4b71Sopenharmony_ci| Promise\<boolean> | Promise used to return the result.<br>The value **true** indicates that the scroll direction is the same as the finger moving direction, and the value **false** indicates the opposite.<br>The default value is **true**.|
1016e41f4b71Sopenharmony_ci
1017e41f4b71Sopenharmony_ci**Error codes**
1018e41f4b71Sopenharmony_ci
1019e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1020e41f4b71Sopenharmony_ci
1021e41f4b71Sopenharmony_ci| ID | Error Message            |
1022e41f4b71Sopenharmony_ci| ---- | --------------------- |
1023e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1024e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1025e41f4b71Sopenharmony_ci
1026e41f4b71Sopenharmony_ci**Example**
1027e41f4b71Sopenharmony_ci
1028e41f4b71Sopenharmony_ci```js
1029e41f4b71Sopenharmony_citry {
1030e41f4b71Sopenharmony_ci  pointer.getTouchpadScrollDirection().then((state: boolean) => {
1031e41f4b71Sopenharmony_ci    console.log(`getTouchpadScrollDirection success, state: ${JSON.stringify(state)}`);
1032e41f4b71Sopenharmony_ci  });
1033e41f4b71Sopenharmony_ci} catch (error) {
1034e41f4b71Sopenharmony_ci  console.log(`getTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1035e41f4b71Sopenharmony_ci}
1036e41f4b71Sopenharmony_ci```
1037e41f4b71Sopenharmony_ci
1038e41f4b71Sopenharmony_ci## pointer.setTouchpadTapSwitch<sup>10+</sup>
1039e41f4b71Sopenharmony_ci
1040e41f4b71Sopenharmony_cisetTouchpadTapSwitch(state: boolean, callback: AsyncCallback\<void>): void
1041e41f4b71Sopenharmony_ci
1042e41f4b71Sopenharmony_ciSets the tap switch of the touchpad. This API uses an asynchronous callback to return the result.
1043e41f4b71Sopenharmony_ci
1044e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1045e41f4b71Sopenharmony_ci
1046e41f4b71Sopenharmony_ci**System API**: This is a system API.
1047e41f4b71Sopenharmony_ci
1048e41f4b71Sopenharmony_ci**Parameters**
1049e41f4b71Sopenharmony_ci
1050e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
1051e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
1052e41f4b71Sopenharmony_ci| state | boolean | Yes   |Tap switch status of the touchpad The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.  |
1053e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void> | Yes   | Callback used to return the result.|
1054e41f4b71Sopenharmony_ci
1055e41f4b71Sopenharmony_ci**Error codes**
1056e41f4b71Sopenharmony_ci
1057e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1058e41f4b71Sopenharmony_ci
1059e41f4b71Sopenharmony_ci| ID | Error Message            |
1060e41f4b71Sopenharmony_ci| ---- | --------------------- |
1061e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1062e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1063e41f4b71Sopenharmony_ci
1064e41f4b71Sopenharmony_ci**Example**
1065e41f4b71Sopenharmony_ci
1066e41f4b71Sopenharmony_ci```js
1067e41f4b71Sopenharmony_citry {
1068e41f4b71Sopenharmony_ci  pointer.setTouchpadTapSwitch(true, (error: Error) => {
1069e41f4b71Sopenharmony_ci    if (error) {
1070e41f4b71Sopenharmony_ci      console.log(`setTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1071e41f4b71Sopenharmony_ci      return;
1072e41f4b71Sopenharmony_ci    }
1073e41f4b71Sopenharmony_ci    console.log(`setTouchpadTapSwitch success`);
1074e41f4b71Sopenharmony_ci  });
1075e41f4b71Sopenharmony_ci} catch (error) {
1076e41f4b71Sopenharmony_ci  console.log(`setTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1077e41f4b71Sopenharmony_ci}
1078e41f4b71Sopenharmony_ci```
1079e41f4b71Sopenharmony_ci
1080e41f4b71Sopenharmony_ci## pointer.setTouchpadTapSwitch <sup>10+</sup>
1081e41f4b71Sopenharmony_ci
1082e41f4b71Sopenharmony_cisetTouchpadTapSwitch(state: boolean): Promise\<void>
1083e41f4b71Sopenharmony_ci
1084e41f4b71Sopenharmony_ciSets the tap switch of the touchpad. This API uses a promise to return the result.
1085e41f4b71Sopenharmony_ci
1086e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1087e41f4b71Sopenharmony_ci
1088e41f4b71Sopenharmony_ci**System API**: This is a system API.
1089e41f4b71Sopenharmony_ci
1090e41f4b71Sopenharmony_ci**Parameters**
1091e41f4b71Sopenharmony_ci
1092e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
1093e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
1094e41f4b71Sopenharmony_ci| state | boolean| Yes   |  Tap switch status of the touchpad. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
1095e41f4b71Sopenharmony_ci
1096e41f4b71Sopenharmony_ci**Return value**
1097e41f4b71Sopenharmony_ci
1098e41f4b71Sopenharmony_ci| Name                 | Description              |
1099e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
1100e41f4b71Sopenharmony_ci| Promise\<void> | Promise used to return the result.|
1101e41f4b71Sopenharmony_ci
1102e41f4b71Sopenharmony_ci**Error codes**
1103e41f4b71Sopenharmony_ci
1104e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1105e41f4b71Sopenharmony_ci
1106e41f4b71Sopenharmony_ci| ID | Error Message            |
1107e41f4b71Sopenharmony_ci| ---- | --------------------- |
1108e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1109e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1110e41f4b71Sopenharmony_ci
1111e41f4b71Sopenharmony_ci**Example**
1112e41f4b71Sopenharmony_ci
1113e41f4b71Sopenharmony_ci```js
1114e41f4b71Sopenharmony_citry {
1115e41f4b71Sopenharmony_ci  pointer.setTouchpadTapSwitch(false).then(() => {
1116e41f4b71Sopenharmony_ci    console.log(`setTouchpadTapSwitch success`);
1117e41f4b71Sopenharmony_ci  });
1118e41f4b71Sopenharmony_ci} catch (error) {
1119e41f4b71Sopenharmony_ci  console.log(`setTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1120e41f4b71Sopenharmony_ci}
1121e41f4b71Sopenharmony_ci```
1122e41f4b71Sopenharmony_ci
1123e41f4b71Sopenharmony_ci## pointer.getTouchpadTapSwitch<sup>10+</sup>
1124e41f4b71Sopenharmony_ci
1125e41f4b71Sopenharmony_cigetTouchpadTapSwitch(callback:  AsyncCallback\<boolean>): void
1126e41f4b71Sopenharmony_ci
1127e41f4b71Sopenharmony_ciObtains the tap switch status of the touchpad. This API uses an asynchronous callback to return the result.
1128e41f4b71Sopenharmony_ci
1129e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1130e41f4b71Sopenharmony_ci
1131e41f4b71Sopenharmony_ci**System API**: This is a system API.
1132e41f4b71Sopenharmony_ci
1133e41f4b71Sopenharmony_ci**Parameters**
1134e41f4b71Sopenharmony_ci
1135e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
1136e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
1137e41f4b71Sopenharmony_ci| callback | AsyncCallback\<boolean> | Yes   | Callback used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
1138e41f4b71Sopenharmony_ci
1139e41f4b71Sopenharmony_ci**Error codes**
1140e41f4b71Sopenharmony_ci
1141e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1142e41f4b71Sopenharmony_ci
1143e41f4b71Sopenharmony_ci| ID | Error Message            |
1144e41f4b71Sopenharmony_ci| ---- | --------------------- |
1145e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1146e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1147e41f4b71Sopenharmony_ci
1148e41f4b71Sopenharmony_ci**Example**
1149e41f4b71Sopenharmony_ci
1150e41f4b71Sopenharmony_ci```js
1151e41f4b71Sopenharmony_citry {
1152e41f4b71Sopenharmony_ci  pointer.getTouchpadTapSwitch((error: Error, state: boolean) => {
1153e41f4b71Sopenharmony_ci    console.log(`getTouchpadTapSwitch success, state: ${JSON.stringify(state)}`);
1154e41f4b71Sopenharmony_ci  });
1155e41f4b71Sopenharmony_ci} catch (error) {
1156e41f4b71Sopenharmony_ci  console.log(`getTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1157e41f4b71Sopenharmony_ci}
1158e41f4b71Sopenharmony_ci```
1159e41f4b71Sopenharmony_ci
1160e41f4b71Sopenharmony_ci## pointer.getTouchpadTapSwitch<sup>10+</sup>
1161e41f4b71Sopenharmony_ci
1162e41f4b71Sopenharmony_cigetTouchpadTapSwitch(): Promise\<boolean>
1163e41f4b71Sopenharmony_ci
1164e41f4b71Sopenharmony_ciObtains the tap switch status of the touchpad. This API uses a promise to return the result.
1165e41f4b71Sopenharmony_ci
1166e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1167e41f4b71Sopenharmony_ci
1168e41f4b71Sopenharmony_ci**System API**: This is a system API.
1169e41f4b71Sopenharmony_ci
1170e41f4b71Sopenharmony_ci**Return value**
1171e41f4b71Sopenharmony_ci
1172e41f4b71Sopenharmony_ci| Name                   | Description                 |
1173e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
1174e41f4b71Sopenharmony_ci| Promise\<boolean> | Promise used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
1175e41f4b71Sopenharmony_ci
1176e41f4b71Sopenharmony_ci**Error codes**
1177e41f4b71Sopenharmony_ci
1178e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1179e41f4b71Sopenharmony_ci
1180e41f4b71Sopenharmony_ci| ID | Error Message            |
1181e41f4b71Sopenharmony_ci| ---- | --------------------- |
1182e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1183e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1184e41f4b71Sopenharmony_ci
1185e41f4b71Sopenharmony_ci**Example**
1186e41f4b71Sopenharmony_ci
1187e41f4b71Sopenharmony_ci```js
1188e41f4b71Sopenharmony_citry {
1189e41f4b71Sopenharmony_ci  pointer.getTouchpadTapSwitch().then((state: boolean) => {
1190e41f4b71Sopenharmony_ci    console.log(`getTouchpadTapSwitch success, state: ${JSON.stringify(state)}`);
1191e41f4b71Sopenharmony_ci  });
1192e41f4b71Sopenharmony_ci} catch (error) {
1193e41f4b71Sopenharmony_ci  console.log(`getTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1194e41f4b71Sopenharmony_ci}
1195e41f4b71Sopenharmony_ci```
1196e41f4b71Sopenharmony_ci
1197e41f4b71Sopenharmony_ci## pointer.setTouchpadPointerSpeed<sup>10+</sup>
1198e41f4b71Sopenharmony_ci
1199e41f4b71Sopenharmony_cisetTouchpadPointerSpeed(speed: number, callback: AsyncCallback\<void>): void
1200e41f4b71Sopenharmony_ci
1201e41f4b71Sopenharmony_ciSets the mouse pointer moving speed of the touchpad. This API uses an asynchronous callback to return the result.
1202e41f4b71Sopenharmony_ci
1203e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1204e41f4b71Sopenharmony_ci
1205e41f4b71Sopenharmony_ci**System API**: This is a system API.
1206e41f4b71Sopenharmony_ci
1207e41f4b71Sopenharmony_ci**Parameters**
1208e41f4b71Sopenharmony_ci
1209e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
1210e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
1211e41f4b71Sopenharmony_ci| speed | number                    | Yes   |Mouse pointer moving speed of the touchpad. The value range is [1,11]. The default value is **6**. |
1212e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void> | Yes   | Callback used to return the result.|
1213e41f4b71Sopenharmony_ci
1214e41f4b71Sopenharmony_ci**Error codes**
1215e41f4b71Sopenharmony_ci
1216e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1217e41f4b71Sopenharmony_ci
1218e41f4b71Sopenharmony_ci| ID | Error Message            |
1219e41f4b71Sopenharmony_ci| ---- | --------------------- |
1220e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1221e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1222e41f4b71Sopenharmony_ci
1223e41f4b71Sopenharmony_ci**Example**
1224e41f4b71Sopenharmony_ci
1225e41f4b71Sopenharmony_ci```js
1226e41f4b71Sopenharmony_citry {
1227e41f4b71Sopenharmony_ci  pointer.setTouchpadPointerSpeed(1, (error: Error) => {
1228e41f4b71Sopenharmony_ci    if (error) {
1229e41f4b71Sopenharmony_ci      console.log(`setTouchpadPointerSpeedfailed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1230e41f4b71Sopenharmony_ci      return;
1231e41f4b71Sopenharmony_ci    }
1232e41f4b71Sopenharmony_ci    console.log(`setTouchpadPointerSpeed success`);
1233e41f4b71Sopenharmony_ci  });
1234e41f4b71Sopenharmony_ci} catch (error) {
1235e41f4b71Sopenharmony_ci  console.log(`setTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1236e41f4b71Sopenharmony_ci}
1237e41f4b71Sopenharmony_ci```
1238e41f4b71Sopenharmony_ci
1239e41f4b71Sopenharmony_ci## pointer.setTouchpadPointerSpeed<sup>10+</sup>
1240e41f4b71Sopenharmony_ci
1241e41f4b71Sopenharmony_cisetTouchpadPointerSpeed(speed: number): Promise\<void>
1242e41f4b71Sopenharmony_ci
1243e41f4b71Sopenharmony_ciSets the mouse pointer moving speed of the touchpad. This API uses a promise to return the result.
1244e41f4b71Sopenharmony_ci
1245e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1246e41f4b71Sopenharmony_ci
1247e41f4b71Sopenharmony_ci**System API**: This is a system API.
1248e41f4b71Sopenharmony_ci
1249e41f4b71Sopenharmony_ci**Parameters**
1250e41f4b71Sopenharmony_ci
1251e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
1252e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
1253e41f4b71Sopenharmony_ci| speed| number | Yes   | Mouse pointer moving speed of the touchpad. The value range is [1,11]. The default value is **6**.   |
1254e41f4b71Sopenharmony_ci
1255e41f4b71Sopenharmony_ci**Return value**
1256e41f4b71Sopenharmony_ci
1257e41f4b71Sopenharmony_ci| Name                 | Description              |
1258e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
1259e41f4b71Sopenharmony_ci| Promise\<void> | Promise used to return the result.|
1260e41f4b71Sopenharmony_ci
1261e41f4b71Sopenharmony_ci**Error codes**
1262e41f4b71Sopenharmony_ci
1263e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1264e41f4b71Sopenharmony_ci
1265e41f4b71Sopenharmony_ci| ID | Error Message            |
1266e41f4b71Sopenharmony_ci| ---- | --------------------- |
1267e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1268e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1269e41f4b71Sopenharmony_ci
1270e41f4b71Sopenharmony_ci**Example**
1271e41f4b71Sopenharmony_ci
1272e41f4b71Sopenharmony_ci```js
1273e41f4b71Sopenharmony_citry {
1274e41f4b71Sopenharmony_ci  pointer.setTouchpadPointerSpeed(10).then(() => {
1275e41f4b71Sopenharmony_ci    console.log(`setTouchpadPointerSpeed success`);
1276e41f4b71Sopenharmony_ci  });
1277e41f4b71Sopenharmony_ci} catch (error) {
1278e41f4b71Sopenharmony_ci  console.log(`setTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1279e41f4b71Sopenharmony_ci}
1280e41f4b71Sopenharmony_ci```
1281e41f4b71Sopenharmony_ci
1282e41f4b71Sopenharmony_ci## pointer.getTouchpadPointerSpeed<sup>10+</sup>
1283e41f4b71Sopenharmony_ci
1284e41f4b71Sopenharmony_cigetTouchpadPointerSpeed(callback: AsyncCallback\<number>): void
1285e41f4b71Sopenharmony_ci
1286e41f4b71Sopenharmony_ciObtains the mouse pointer moving speed of the touchpad. This API uses an asynchronous callback to return the result.
1287e41f4b71Sopenharmony_ci
1288e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1289e41f4b71Sopenharmony_ci
1290e41f4b71Sopenharmony_ci**System API**: This is a system API.
1291e41f4b71Sopenharmony_ci
1292e41f4b71Sopenharmony_ci**Parameters**
1293e41f4b71Sopenharmony_ci
1294e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
1295e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
1296e41f4b71Sopenharmony_ci| callback | AsyncCallback\<number> | Yes   | Callback used to return the result.|
1297e41f4b71Sopenharmony_ci
1298e41f4b71Sopenharmony_ci**Error codes**
1299e41f4b71Sopenharmony_ci
1300e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1301e41f4b71Sopenharmony_ci
1302e41f4b71Sopenharmony_ci| ID | Error Message            |
1303e41f4b71Sopenharmony_ci| ---- | --------------------- |
1304e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1305e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1306e41f4b71Sopenharmony_ci
1307e41f4b71Sopenharmony_ci**Example**
1308e41f4b71Sopenharmony_ci
1309e41f4b71Sopenharmony_ci```js
1310e41f4b71Sopenharmony_citry {
1311e41f4b71Sopenharmony_ci  pointer.getTouchpadPointerSpeed((error: Error, speed: number) => {
1312e41f4b71Sopenharmony_ci    console.log(`getTouchpadPointerSpeed success, speed: ${JSON.stringify(speed)}`);
1313e41f4b71Sopenharmony_ci  });
1314e41f4b71Sopenharmony_ci} catch (error) {
1315e41f4b71Sopenharmony_ci  console.log(`getTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1316e41f4b71Sopenharmony_ci}
1317e41f4b71Sopenharmony_ci```
1318e41f4b71Sopenharmony_ci
1319e41f4b71Sopenharmony_ci## pointer.getTouchpadPointerSpeed<sup>10+</sup>
1320e41f4b71Sopenharmony_ci
1321e41f4b71Sopenharmony_cigetTouchpadPointerSpeed(): Promise\<number>
1322e41f4b71Sopenharmony_ci
1323e41f4b71Sopenharmony_ciObtains the mouse pointer moving speed of the touchpad. This API uses a promise to return the result.
1324e41f4b71Sopenharmony_ci
1325e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1326e41f4b71Sopenharmony_ci
1327e41f4b71Sopenharmony_ci**System API**: This is a system API.
1328e41f4b71Sopenharmony_ci
1329e41f4b71Sopenharmony_ci**Return value**
1330e41f4b71Sopenharmony_ci
1331e41f4b71Sopenharmony_ci| Name                   | Description                 |
1332e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
1333e41f4b71Sopenharmony_ci| Promise\<number> | Promise used to return the result.|
1334e41f4b71Sopenharmony_ci
1335e41f4b71Sopenharmony_ci**Error codes**
1336e41f4b71Sopenharmony_ci
1337e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1338e41f4b71Sopenharmony_ci
1339e41f4b71Sopenharmony_ci| ID | Error Message            |
1340e41f4b71Sopenharmony_ci| ---- | --------------------- |
1341e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1342e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1343e41f4b71Sopenharmony_ci
1344e41f4b71Sopenharmony_ci**Example**
1345e41f4b71Sopenharmony_ci
1346e41f4b71Sopenharmony_ci```js
1347e41f4b71Sopenharmony_citry {
1348e41f4b71Sopenharmony_ci  pointer.getTouchpadPointerSpeed().then((speed: number) => {
1349e41f4b71Sopenharmony_ci    console.log(`getTouchpadPointerSpeed success, speed: ${JSON.stringify(speed)}`);
1350e41f4b71Sopenharmony_ci  });
1351e41f4b71Sopenharmony_ci} catch (error) {
1352e41f4b71Sopenharmony_ci  console.log(`getTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1353e41f4b71Sopenharmony_ci}
1354e41f4b71Sopenharmony_ci```
1355e41f4b71Sopenharmony_ci
1356e41f4b71Sopenharmony_ci## pointer.setTouchpadPinchSwitch<sup>10+</sup>
1357e41f4b71Sopenharmony_ci
1358e41f4b71Sopenharmony_cisetTouchpadPinchSwitch(state: boolean, callback: AsyncCallback\<void>): void
1359e41f4b71Sopenharmony_ci
1360e41f4b71Sopenharmony_ciSets the pinch switch of the touchpad. This API uses an asynchronous callback to return the result.
1361e41f4b71Sopenharmony_ci
1362e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1363e41f4b71Sopenharmony_ci
1364e41f4b71Sopenharmony_ci**System API**: This is a system API.
1365e41f4b71Sopenharmony_ci
1366e41f4b71Sopenharmony_ci**Parameters**
1367e41f4b71Sopenharmony_ci
1368e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
1369e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
1370e41f4b71Sopenharmony_ci| state | boolean | Yes   |Pinch switch status of the touchpad. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.  |
1371e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void> | Yes   | Callback used to return the result.|
1372e41f4b71Sopenharmony_ci
1373e41f4b71Sopenharmony_ci**Error codes**
1374e41f4b71Sopenharmony_ci
1375e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1376e41f4b71Sopenharmony_ci
1377e41f4b71Sopenharmony_ci| ID | Error Message            |
1378e41f4b71Sopenharmony_ci| ---- | --------------------- |
1379e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1380e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1381e41f4b71Sopenharmony_ci
1382e41f4b71Sopenharmony_ci**Example**
1383e41f4b71Sopenharmony_ci
1384e41f4b71Sopenharmony_ci```js
1385e41f4b71Sopenharmony_citry {
1386e41f4b71Sopenharmony_ci  pointer.setTouchpadTapSwitch(true, (error: Error) => {
1387e41f4b71Sopenharmony_ci    if (error) {
1388e41f4b71Sopenharmony_ci      console.log(`setTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1389e41f4b71Sopenharmony_ci      return;
1390e41f4b71Sopenharmony_ci    }
1391e41f4b71Sopenharmony_ci    console.log(`setTouchpadPinchSwitch success`);
1392e41f4b71Sopenharmony_ci  });
1393e41f4b71Sopenharmony_ci} catch (error) {
1394e41f4b71Sopenharmony_ci  console.log(`setTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1395e41f4b71Sopenharmony_ci}
1396e41f4b71Sopenharmony_ci```
1397e41f4b71Sopenharmony_ci
1398e41f4b71Sopenharmony_ci## pointer.setTouchpadPinchSwitch<sup>10+</sup>
1399e41f4b71Sopenharmony_ci
1400e41f4b71Sopenharmony_cisetTouchpadPinchSwitch(state: boolean): Promise\<void>
1401e41f4b71Sopenharmony_ci
1402e41f4b71Sopenharmony_ciSets the pinch switch of the touchpad. This API uses a promise to return the result.
1403e41f4b71Sopenharmony_ci
1404e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1405e41f4b71Sopenharmony_ci
1406e41f4b71Sopenharmony_ci**System API**: This is a system API.
1407e41f4b71Sopenharmony_ci
1408e41f4b71Sopenharmony_ci**Parameters**
1409e41f4b71Sopenharmony_ci
1410e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
1411e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
1412e41f4b71Sopenharmony_ci| state | boolean| Yes   |  Pinch switch status of the touchpad. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
1413e41f4b71Sopenharmony_ci
1414e41f4b71Sopenharmony_ci**Return value**
1415e41f4b71Sopenharmony_ci
1416e41f4b71Sopenharmony_ci| Name                 | Description              |
1417e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
1418e41f4b71Sopenharmony_ci| Promise\<void> | Promise used to return the result.|
1419e41f4b71Sopenharmony_ci
1420e41f4b71Sopenharmony_ci**Error codes**
1421e41f4b71Sopenharmony_ci
1422e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1423e41f4b71Sopenharmony_ci
1424e41f4b71Sopenharmony_ci| ID | Error Message            |
1425e41f4b71Sopenharmony_ci| ---- | --------------------- |
1426e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1427e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1428e41f4b71Sopenharmony_ci
1429e41f4b71Sopenharmony_ci**Example**
1430e41f4b71Sopenharmony_ci
1431e41f4b71Sopenharmony_ci```js
1432e41f4b71Sopenharmony_citry {
1433e41f4b71Sopenharmony_ci  pointer.setTouchpadPinchSwitch(false).then(() => {
1434e41f4b71Sopenharmony_ci    console.log(`setTouchpadPinchSwitch success`);
1435e41f4b71Sopenharmony_ci  });
1436e41f4b71Sopenharmony_ci} catch (error) {
1437e41f4b71Sopenharmony_ci  console.log(`setTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1438e41f4b71Sopenharmony_ci}
1439e41f4b71Sopenharmony_ci```
1440e41f4b71Sopenharmony_ci
1441e41f4b71Sopenharmony_ci## pointer.getTouchpadPinchSwitch<sup>10+</sup>
1442e41f4b71Sopenharmony_ci
1443e41f4b71Sopenharmony_cigetTouchpadPinchSwitch(callback:  AsyncCallback\<boolean>): void
1444e41f4b71Sopenharmony_ci
1445e41f4b71Sopenharmony_ciObtains the pinch switch status of the touchpad. This API uses an asynchronous callback to return the result.
1446e41f4b71Sopenharmony_ci
1447e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1448e41f4b71Sopenharmony_ci
1449e41f4b71Sopenharmony_ci**System API**: This is a system API.
1450e41f4b71Sopenharmony_ci
1451e41f4b71Sopenharmony_ci**Parameters**
1452e41f4b71Sopenharmony_ci
1453e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
1454e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
1455e41f4b71Sopenharmony_ci| callback | AsyncCallback\<boolean> | Yes   | Callback used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
1456e41f4b71Sopenharmony_ci
1457e41f4b71Sopenharmony_ci**Error codes**
1458e41f4b71Sopenharmony_ci
1459e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1460e41f4b71Sopenharmony_ci
1461e41f4b71Sopenharmony_ci| ID | Error Message            |
1462e41f4b71Sopenharmony_ci| ---- | --------------------- |
1463e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1464e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1465e41f4b71Sopenharmony_ci
1466e41f4b71Sopenharmony_ci**Example**
1467e41f4b71Sopenharmony_ci
1468e41f4b71Sopenharmony_ci```js
1469e41f4b71Sopenharmony_citry {
1470e41f4b71Sopenharmony_ci  pointer.getTouchpadPinchSwitch((error: Error, state: boolean) => {
1471e41f4b71Sopenharmony_ci    console.log(`getTouchpadPinchSwitch success, state: ${JSON.stringify(state)}`);
1472e41f4b71Sopenharmony_ci  });
1473e41f4b71Sopenharmony_ci} catch (error) {
1474e41f4b71Sopenharmony_ci  console.log(`getTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1475e41f4b71Sopenharmony_ci}
1476e41f4b71Sopenharmony_ci```
1477e41f4b71Sopenharmony_ci
1478e41f4b71Sopenharmony_ci## pointer.getTouchpadPinchSwitch<sup>10+</sup>
1479e41f4b71Sopenharmony_ci
1480e41f4b71Sopenharmony_cigetTouchpadPinchSwitch(): Promise\<boolean>
1481e41f4b71Sopenharmony_ci
1482e41f4b71Sopenharmony_ciObtains the pinch switch status of the touchpad. This API uses a promise to return the result.
1483e41f4b71Sopenharmony_ci
1484e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1485e41f4b71Sopenharmony_ci
1486e41f4b71Sopenharmony_ci**System API**: This is a system API.
1487e41f4b71Sopenharmony_ci
1488e41f4b71Sopenharmony_ci**Return value**
1489e41f4b71Sopenharmony_ci
1490e41f4b71Sopenharmony_ci| Name                   | Description                 |
1491e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
1492e41f4b71Sopenharmony_ci| Promise\<boolean> | Promise used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
1493e41f4b71Sopenharmony_ci
1494e41f4b71Sopenharmony_ci**Error codes**
1495e41f4b71Sopenharmony_ci
1496e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1497e41f4b71Sopenharmony_ci
1498e41f4b71Sopenharmony_ci| ID | Error Message            |
1499e41f4b71Sopenharmony_ci| ---- | --------------------- |
1500e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1501e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1502e41f4b71Sopenharmony_ci
1503e41f4b71Sopenharmony_ci**Example**
1504e41f4b71Sopenharmony_ci
1505e41f4b71Sopenharmony_ci```js
1506e41f4b71Sopenharmony_citry {
1507e41f4b71Sopenharmony_ci  pointer.getTouchpadPinchSwitch().then((state: boolean) => {
1508e41f4b71Sopenharmony_ci    console.log(`getTouchpadPinchSwitch success, state: ${JSON.stringify(state)}`);
1509e41f4b71Sopenharmony_ci  });
1510e41f4b71Sopenharmony_ci} catch (error) {
1511e41f4b71Sopenharmony_ci  console.log(`getTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1512e41f4b71Sopenharmony_ci}
1513e41f4b71Sopenharmony_ci```
1514e41f4b71Sopenharmony_ci
1515e41f4b71Sopenharmony_ci## pointer.setTouchpadSwipeSwitch<sup>10+</sup>
1516e41f4b71Sopenharmony_ci
1517e41f4b71Sopenharmony_cisetTouchpadSwipeSwitch(state: boolean, callback: AsyncCallback\<void>): void
1518e41f4b71Sopenharmony_ci
1519e41f4b71Sopenharmony_ciSets the multi-finger swipe switch of the touchpad. This API uses an asynchronous callback to return the result.
1520e41f4b71Sopenharmony_ci
1521e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1522e41f4b71Sopenharmony_ci
1523e41f4b71Sopenharmony_ci**System API**: This is a system API.
1524e41f4b71Sopenharmony_ci
1525e41f4b71Sopenharmony_ci**Parameters**
1526e41f4b71Sopenharmony_ci
1527e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
1528e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
1529e41f4b71Sopenharmony_ci| state | boolean | Yes   |Swipe switch status of the touchpad. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.  |
1530e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void> | Yes   | Callback used to return the result.|
1531e41f4b71Sopenharmony_ci
1532e41f4b71Sopenharmony_ci**Error codes**
1533e41f4b71Sopenharmony_ci
1534e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1535e41f4b71Sopenharmony_ci
1536e41f4b71Sopenharmony_ci| ID | Error Message            |
1537e41f4b71Sopenharmony_ci| ---- | --------------------- |
1538e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1539e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1540e41f4b71Sopenharmony_ci
1541e41f4b71Sopenharmony_ci**Example**
1542e41f4b71Sopenharmony_ci
1543e41f4b71Sopenharmony_ci```js
1544e41f4b71Sopenharmony_citry {
1545e41f4b71Sopenharmony_ci  pointer.setTouchpadSwipeSwitch(true, (error: Error) => {
1546e41f4b71Sopenharmony_ci    if (error) {
1547e41f4b71Sopenharmony_ci      console.log(`setTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1548e41f4b71Sopenharmony_ci      return;
1549e41f4b71Sopenharmony_ci    }
1550e41f4b71Sopenharmony_ci    console.log(`setTouchpadSwipeSwitch success`);
1551e41f4b71Sopenharmony_ci  });
1552e41f4b71Sopenharmony_ci} catch (error) {
1553e41f4b71Sopenharmony_ci  console.log(`setTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1554e41f4b71Sopenharmony_ci}
1555e41f4b71Sopenharmony_ci```
1556e41f4b71Sopenharmony_ci
1557e41f4b71Sopenharmony_ci## pointer.setTouchpadSwipeSwitch<sup>10+</sup>
1558e41f4b71Sopenharmony_ci
1559e41f4b71Sopenharmony_cisetTouchpadSwipeSwitch(state: boolean): Promise\<void>
1560e41f4b71Sopenharmony_ci
1561e41f4b71Sopenharmony_ciSets the swipe switch of the touchpad. This API uses a promise to return the result.
1562e41f4b71Sopenharmony_ci
1563e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1564e41f4b71Sopenharmony_ci
1565e41f4b71Sopenharmony_ci**System API**: This is a system API.
1566e41f4b71Sopenharmony_ci
1567e41f4b71Sopenharmony_ci**Parameters**
1568e41f4b71Sopenharmony_ci
1569e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
1570e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
1571e41f4b71Sopenharmony_ci| state | boolean| Yes   |  Swipe switch status of the touchpad. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
1572e41f4b71Sopenharmony_ci
1573e41f4b71Sopenharmony_ci**Return value**
1574e41f4b71Sopenharmony_ci
1575e41f4b71Sopenharmony_ci| Name                 | Description              |
1576e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
1577e41f4b71Sopenharmony_ci| Promise\<void> | Promise used to return the result.|
1578e41f4b71Sopenharmony_ci
1579e41f4b71Sopenharmony_ci**Error codes**
1580e41f4b71Sopenharmony_ci
1581e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1582e41f4b71Sopenharmony_ci
1583e41f4b71Sopenharmony_ci| ID | Error Message            |
1584e41f4b71Sopenharmony_ci| ---- | --------------------- |
1585e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1586e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1587e41f4b71Sopenharmony_ci
1588e41f4b71Sopenharmony_ci**Example**
1589e41f4b71Sopenharmony_ci
1590e41f4b71Sopenharmony_ci```js
1591e41f4b71Sopenharmony_citry {
1592e41f4b71Sopenharmony_ci  pointer.setTouchpadSwipeSwitch(false).then(() => {
1593e41f4b71Sopenharmony_ci    console.log(`setTouchpadSwipeSwitch success`);
1594e41f4b71Sopenharmony_ci  });
1595e41f4b71Sopenharmony_ci} catch (error) {
1596e41f4b71Sopenharmony_ci  console.log(`setTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1597e41f4b71Sopenharmony_ci}
1598e41f4b71Sopenharmony_ci```
1599e41f4b71Sopenharmony_ci
1600e41f4b71Sopenharmony_ci## pointer.getTouchpadSwipeSwitch<sup>10+</sup>
1601e41f4b71Sopenharmony_ci
1602e41f4b71Sopenharmony_cigetTouchpadSwipeSwitch(callback:  AsyncCallback\<boolean>): void
1603e41f4b71Sopenharmony_ci
1604e41f4b71Sopenharmony_ciObtains the multi-finger swipe switch status of the touchpad. This API uses an asynchronous callback to return the result.
1605e41f4b71Sopenharmony_ci
1606e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1607e41f4b71Sopenharmony_ci
1608e41f4b71Sopenharmony_ci**System API**: This is a system API.
1609e41f4b71Sopenharmony_ci
1610e41f4b71Sopenharmony_ci**Parameters**
1611e41f4b71Sopenharmony_ci
1612e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
1613e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
1614e41f4b71Sopenharmony_ci| callback | AsyncCallback\<boolean> | Yes   | Callback used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
1615e41f4b71Sopenharmony_ci
1616e41f4b71Sopenharmony_ci**Error codes**
1617e41f4b71Sopenharmony_ci
1618e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1619e41f4b71Sopenharmony_ci
1620e41f4b71Sopenharmony_ci| ID | Error Message            |
1621e41f4b71Sopenharmony_ci| ---- | --------------------- |
1622e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1623e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1624e41f4b71Sopenharmony_ci
1625e41f4b71Sopenharmony_ci**Example**
1626e41f4b71Sopenharmony_ci
1627e41f4b71Sopenharmony_ci```js
1628e41f4b71Sopenharmony_citry {
1629e41f4b71Sopenharmony_ci  pointer.getTouchpadSwipeSwitch((error: Error, state: boolean) => {
1630e41f4b71Sopenharmony_ci    console.log(`getTouchpadSwipeSwitch success, state: ${JSON.stringify(state)}`);
1631e41f4b71Sopenharmony_ci  });
1632e41f4b71Sopenharmony_ci} catch (error) {
1633e41f4b71Sopenharmony_ci  console.log(`getTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1634e41f4b71Sopenharmony_ci}
1635e41f4b71Sopenharmony_ci```
1636e41f4b71Sopenharmony_ci
1637e41f4b71Sopenharmony_ci## pointer.getTouchpadSwipeSwitch<sup>10+</sup>
1638e41f4b71Sopenharmony_ci
1639e41f4b71Sopenharmony_cigetTouchpadSwipeSwitch(): Promise\<boolean>
1640e41f4b71Sopenharmony_ci
1641e41f4b71Sopenharmony_ciObtains the multi-finger swipe switch status of the touchpad. This API uses a promise to return the result.
1642e41f4b71Sopenharmony_ci
1643e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1644e41f4b71Sopenharmony_ci
1645e41f4b71Sopenharmony_ci**System API**: This is a system API.
1646e41f4b71Sopenharmony_ci
1647e41f4b71Sopenharmony_ci**Return value**
1648e41f4b71Sopenharmony_ci
1649e41f4b71Sopenharmony_ci| Name                   | Description                 |
1650e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
1651e41f4b71Sopenharmony_ci| Promise\<boolean> | Promise used to return the result. The value **true** indicates that the switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
1652e41f4b71Sopenharmony_ci
1653e41f4b71Sopenharmony_ci**Error codes**
1654e41f4b71Sopenharmony_ci
1655e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1656e41f4b71Sopenharmony_ci
1657e41f4b71Sopenharmony_ci| ID | Error Message            |
1658e41f4b71Sopenharmony_ci| ---- | --------------------- |
1659e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1660e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1661e41f4b71Sopenharmony_ci
1662e41f4b71Sopenharmony_ci**Example**
1663e41f4b71Sopenharmony_ci
1664e41f4b71Sopenharmony_ci```js
1665e41f4b71Sopenharmony_citry {
1666e41f4b71Sopenharmony_ci  pointer.getTouchpadSwipeSwitch().then((state: boolean) => {
1667e41f4b71Sopenharmony_ci    console.log(`getTouchpadSwipeSwitch success, state: ${JSON.stringify(state)}`);
1668e41f4b71Sopenharmony_ci  });
1669e41f4b71Sopenharmony_ci} catch (error) {
1670e41f4b71Sopenharmony_ci  console.log(`getTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1671e41f4b71Sopenharmony_ci}
1672e41f4b71Sopenharmony_ci```
1673e41f4b71Sopenharmony_ci
1674e41f4b71Sopenharmony_ci## pointer.setTouchpadRightClickType<sup>10+</sup>
1675e41f4b71Sopenharmony_ci
1676e41f4b71Sopenharmony_cisetTouchpadRightClickType(type: RightClickType, callback: AsyncCallback\<void>): void
1677e41f4b71Sopenharmony_ci
1678e41f4b71Sopenharmony_ciSets the shortcut menu type of the touchpad. This API uses an asynchronous callback to return the result.
1679e41f4b71Sopenharmony_ci
1680e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1681e41f4b71Sopenharmony_ci
1682e41f4b71Sopenharmony_ci**System API**: This is a system API.
1683e41f4b71Sopenharmony_ci
1684e41f4b71Sopenharmony_ci**Parameters**
1685e41f4b71Sopenharmony_ci
1686e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
1687e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
1688e41f4b71Sopenharmony_ci| type| [RightClickType](js-apis-pointer.md#rightclicktype10)| Yes   |Shortcut menu type of the touchpad.<br>- TOUCHPAD_RIGHT_BUTTON: tapping the right-button area of the touchpad.<br>- TOUCHPAD_LEFT_BUTTON: tapping the left-button area of the touchpad.<br>- TOUCHPAD_TWO_FINGER_TAP: tapping or pressing the touchpad with two fingers.<br>The default value is **TOUCHPAD_RIGHT_BUTTON**. |
1689e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void> | Yes   | Callback used to return the result.|
1690e41f4b71Sopenharmony_ci
1691e41f4b71Sopenharmony_ci**Error codes**
1692e41f4b71Sopenharmony_ci
1693e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1694e41f4b71Sopenharmony_ci
1695e41f4b71Sopenharmony_ci| ID | Error Message            |
1696e41f4b71Sopenharmony_ci| ---- | --------------------- |
1697e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1698e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1699e41f4b71Sopenharmony_ci
1700e41f4b71Sopenharmony_ci**Example**
1701e41f4b71Sopenharmony_ci
1702e41f4b71Sopenharmony_ci```js
1703e41f4b71Sopenharmony_citry {
1704e41f4b71Sopenharmony_ci  pointer.setTouchpadRightClickType(pointer.RightClickType.TOUCHPAD_RIGHT_BUTTON , (error: Error) => {
1705e41f4b71Sopenharmony_ci    if (error) {
1706e41f4b71Sopenharmony_ci      console.log(`setTouchpadRightClickType, error: ${JSON.stringify(error, [`code`, `message`])}`);
1707e41f4b71Sopenharmony_ci      return;
1708e41f4b71Sopenharmony_ci    }
1709e41f4b71Sopenharmony_ci    console.log(`setTouchpadRightClickType success`);
1710e41f4b71Sopenharmony_ci  });
1711e41f4b71Sopenharmony_ci} catch (error) {
1712e41f4b71Sopenharmony_ci  console.log(`setTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1713e41f4b71Sopenharmony_ci}
1714e41f4b71Sopenharmony_ci```
1715e41f4b71Sopenharmony_ci
1716e41f4b71Sopenharmony_ci## pointer.setTouchpadRightClickType<sup>10+</sup>
1717e41f4b71Sopenharmony_ci
1718e41f4b71Sopenharmony_cisetTouchpadRightClickType(type: RightClickType): Promise\<void>
1719e41f4b71Sopenharmony_ci
1720e41f4b71Sopenharmony_ciSets the shortcut menu type of the touchpad. This API uses a promise to return the result.
1721e41f4b71Sopenharmony_ci
1722e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1723e41f4b71Sopenharmony_ci
1724e41f4b71Sopenharmony_ci**System API**: This is a system API.
1725e41f4b71Sopenharmony_ci
1726e41f4b71Sopenharmony_ci**Parameters**
1727e41f4b71Sopenharmony_ci
1728e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
1729e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
1730e41f4b71Sopenharmony_ci| type| [RightClickType](js-apis-pointer.md#rightclicktype10)| Yes   | Shortcut menu type of the touchpad.<br>- TOUCHPAD_RIGHT_BUTTON: tapping the right-button area of the touchpad.<br>- TOUCHPAD_LEFT_BUTTON: tapping the left-button area of the touchpad.<br>- TOUCHPAD_TWO_FINGER_TAP: tapping or pressing the touchpad with two fingers.<br>The default value is **TOUCHPAD_RIGHT_BUTTON**.|
1731e41f4b71Sopenharmony_ci
1732e41f4b71Sopenharmony_ci**Return value**
1733e41f4b71Sopenharmony_ci
1734e41f4b71Sopenharmony_ci| Name                 | Description              |
1735e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
1736e41f4b71Sopenharmony_ci| Promise\<void> | Promise used to return the result.|
1737e41f4b71Sopenharmony_ci
1738e41f4b71Sopenharmony_ci**Error codes**
1739e41f4b71Sopenharmony_ci
1740e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1741e41f4b71Sopenharmony_ci
1742e41f4b71Sopenharmony_ci| ID | Error Message            |
1743e41f4b71Sopenharmony_ci| ---- | --------------------- |
1744e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1745e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1746e41f4b71Sopenharmony_ci
1747e41f4b71Sopenharmony_ci**Example**
1748e41f4b71Sopenharmony_ci
1749e41f4b71Sopenharmony_ci```js
1750e41f4b71Sopenharmony_citry {
1751e41f4b71Sopenharmony_ci  pointer.setTouchpadRightClickType(pointer.RightClickType.TOUCHPAD_RIGHT_BUTTON).then(() => {
1752e41f4b71Sopenharmony_ci    console.log(`setTouchpadRightClickType success`);
1753e41f4b71Sopenharmony_ci  });
1754e41f4b71Sopenharmony_ci} catch (error) {
1755e41f4b71Sopenharmony_ci  console.log(`setTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1756e41f4b71Sopenharmony_ci}
1757e41f4b71Sopenharmony_ci```
1758e41f4b71Sopenharmony_ci
1759e41f4b71Sopenharmony_ci## pointer.getTouchpadRightClickType<sup>10+</sup>
1760e41f4b71Sopenharmony_ci
1761e41f4b71Sopenharmony_cigetTouchpadRightClickType(callback: AsyncCallback\<RightClickType>): void
1762e41f4b71Sopenharmony_ci
1763e41f4b71Sopenharmony_ciObtains the shortcut menu type of the touchpad. This API uses an asynchronous callback to return the result.
1764e41f4b71Sopenharmony_ci
1765e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1766e41f4b71Sopenharmony_ci
1767e41f4b71Sopenharmony_ci**System API**: This is a system API.
1768e41f4b71Sopenharmony_ci
1769e41f4b71Sopenharmony_ci**Parameters**
1770e41f4b71Sopenharmony_ci
1771e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
1772e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
1773e41f4b71Sopenharmony_ci| callback | AsyncCallback\<[RightClickType](js-apis-pointer.md#rightclicktype10)> | Yes   | Callback used to return the result.|
1774e41f4b71Sopenharmony_ci
1775e41f4b71Sopenharmony_ci**Error codes**
1776e41f4b71Sopenharmony_ci
1777e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1778e41f4b71Sopenharmony_ci
1779e41f4b71Sopenharmony_ci| ID | Error Message            |
1780e41f4b71Sopenharmony_ci| ---- | --------------------- |
1781e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1782e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1783e41f4b71Sopenharmony_ci
1784e41f4b71Sopenharmony_ci**Example**
1785e41f4b71Sopenharmony_ci
1786e41f4b71Sopenharmony_ci```js
1787e41f4b71Sopenharmony_citry {
1788e41f4b71Sopenharmony_ci  pointer.getTouchpadRightClickType((error: Error, type: pointer.RightClickType) => {
1789e41f4b71Sopenharmony_ci    console.log(`getTouchpadRightClickType success, type: ${JSON.stringify(type)}`);
1790e41f4b71Sopenharmony_ci  });
1791e41f4b71Sopenharmony_ci} catch (error) {
1792e41f4b71Sopenharmony_ci  console.log(`getTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1793e41f4b71Sopenharmony_ci}
1794e41f4b71Sopenharmony_ci```
1795e41f4b71Sopenharmony_ci
1796e41f4b71Sopenharmony_ci## pointer.getTouchpadRightClickType<sup>10+</sup>
1797e41f4b71Sopenharmony_ci
1798e41f4b71Sopenharmony_cigetTouchpadRightClickType(): Promise\<RightClickType>
1799e41f4b71Sopenharmony_ci
1800e41f4b71Sopenharmony_ciObtains the shortcut menu type of the touchpad. This API uses a promise to return the result.
1801e41f4b71Sopenharmony_ci
1802e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1803e41f4b71Sopenharmony_ci
1804e41f4b71Sopenharmony_ci**System API**: This is a system API.
1805e41f4b71Sopenharmony_ci
1806e41f4b71Sopenharmony_ci**Return value**
1807e41f4b71Sopenharmony_ci
1808e41f4b71Sopenharmony_ci| Name                   | Description                 |
1809e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
1810e41f4b71Sopenharmony_ci| Promise\<[RightClickType](js-apis-pointer.md#rightclicktype10) > | Promise used to return the result.|
1811e41f4b71Sopenharmony_ci
1812e41f4b71Sopenharmony_ci**Error codes**
1813e41f4b71Sopenharmony_ci
1814e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1815e41f4b71Sopenharmony_ci
1816e41f4b71Sopenharmony_ci| ID | Error Message            |
1817e41f4b71Sopenharmony_ci| ---- | --------------------- |
1818e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1819e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1820e41f4b71Sopenharmony_ci
1821e41f4b71Sopenharmony_ci**Example**
1822e41f4b71Sopenharmony_ci
1823e41f4b71Sopenharmony_ci```js
1824e41f4b71Sopenharmony_citry {
1825e41f4b71Sopenharmony_ci  pointer.getTouchpadRightClickType().then((type: pointer.RightClickType) => {
1826e41f4b71Sopenharmony_ci    console.log(`getTouchpadRightClickType success, typeed: ${JSON.stringify(type)}`);
1827e41f4b71Sopenharmony_ci  });
1828e41f4b71Sopenharmony_ci} catch (error) {
1829e41f4b71Sopenharmony_ci  console.log(`getTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1830e41f4b71Sopenharmony_ci}
1831e41f4b71Sopenharmony_ci```
1832e41f4b71Sopenharmony_ci
1833e41f4b71Sopenharmony_ci## pointer.setPointerSize<sup>10+</sup>
1834e41f4b71Sopenharmony_ci
1835e41f4b71Sopenharmony_cisetPointerSize(size: number, callback: AsyncCallback&lt;void&gt;): void
1836e41f4b71Sopenharmony_ci
1837e41f4b71Sopenharmony_ciSets the pointer size. This API uses an asynchronous callback to return the result.
1838e41f4b71Sopenharmony_ci
1839e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1840e41f4b71Sopenharmony_ci
1841e41f4b71Sopenharmony_ci**System API**: This is a system API.
1842e41f4b71Sopenharmony_ci
1843e41f4b71Sopenharmony_ci**Parameters**
1844e41f4b71Sopenharmony_ci
1845e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
1846e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
1847e41f4b71Sopenharmony_ci| size     | number                    | Yes   | Pointer size. The value ranges from **1** to **7**. The default value is **1**.  |
1848e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;void&gt; | Yes   | Callback used to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error object.|
1849e41f4b71Sopenharmony_ci
1850e41f4b71Sopenharmony_ci**Error codes**
1851e41f4b71Sopenharmony_ci
1852e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1853e41f4b71Sopenharmony_ci
1854e41f4b71Sopenharmony_ci| ID | Error Message            |
1855e41f4b71Sopenharmony_ci| ---- | --------------------- |
1856e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1857e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1858e41f4b71Sopenharmony_ci
1859e41f4b71Sopenharmony_ci**Example**
1860e41f4b71Sopenharmony_ci
1861e41f4b71Sopenharmony_ci```js
1862e41f4b71Sopenharmony_citry {
1863e41f4b71Sopenharmony_ci  pointer.setPointerSize(1, (error: Error) => {
1864e41f4b71Sopenharmony_ci    if (error) {
1865e41f4b71Sopenharmony_ci      console.log(`setPointerSize failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1866e41f4b71Sopenharmony_ci      return;
1867e41f4b71Sopenharmony_ci    }
1868e41f4b71Sopenharmony_ci    console.log(`setPointerSize success`);
1869e41f4b71Sopenharmony_ci  });
1870e41f4b71Sopenharmony_ci} catch (error) {
1871e41f4b71Sopenharmony_ci  console.log(`setPointerSize failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1872e41f4b71Sopenharmony_ci}
1873e41f4b71Sopenharmony_ci```
1874e41f4b71Sopenharmony_ci
1875e41f4b71Sopenharmony_ci## pointer.setPointerSize<sup>10+</sup>
1876e41f4b71Sopenharmony_ci
1877e41f4b71Sopenharmony_cisetPointerSize(size: number): Promise&lt;void&gt;
1878e41f4b71Sopenharmony_ci
1879e41f4b71Sopenharmony_ciSets the pointer size. This API uses a promise to return the result.
1880e41f4b71Sopenharmony_ci
1881e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1882e41f4b71Sopenharmony_ci
1883e41f4b71Sopenharmony_ci**System API**: This is a system API.
1884e41f4b71Sopenharmony_ci
1885e41f4b71Sopenharmony_ci**Parameters**
1886e41f4b71Sopenharmony_ci
1887e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
1888e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
1889e41f4b71Sopenharmony_ci| size  | number | Yes   | Pointer size. The value ranges from **1** to **7**. The default value is **1**.|
1890e41f4b71Sopenharmony_ci
1891e41f4b71Sopenharmony_ci**Return value**
1892e41f4b71Sopenharmony_ci
1893e41f4b71Sopenharmony_ci| Name                 | Description              |
1894e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
1895e41f4b71Sopenharmony_ci| Promise&lt;void&gt; | Promise that returns no value.|
1896e41f4b71Sopenharmony_ci
1897e41f4b71Sopenharmony_ci**Error codes**
1898e41f4b71Sopenharmony_ci
1899e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1900e41f4b71Sopenharmony_ci
1901e41f4b71Sopenharmony_ci| ID | Error Message            |
1902e41f4b71Sopenharmony_ci| ---- | --------------------- |
1903e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1904e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1905e41f4b71Sopenharmony_ci
1906e41f4b71Sopenharmony_ci**Example**
1907e41f4b71Sopenharmony_ci
1908e41f4b71Sopenharmony_ci```js
1909e41f4b71Sopenharmony_citry {
1910e41f4b71Sopenharmony_ci  pointer.setPointerSize(3).then(() => {
1911e41f4b71Sopenharmony_ci    console.log(`setPointerSize success`);
1912e41f4b71Sopenharmony_ci  });
1913e41f4b71Sopenharmony_ci} catch (error) {
1914e41f4b71Sopenharmony_ci  console.log(`setPointerSize failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1915e41f4b71Sopenharmony_ci}
1916e41f4b71Sopenharmony_ci```
1917e41f4b71Sopenharmony_ci
1918e41f4b71Sopenharmony_ci## pointer.setPointerSizeSync<sup>10+</sup>
1919e41f4b71Sopenharmony_ci
1920e41f4b71Sopenharmony_cisetPointerSizeSync(size: number): void;
1921e41f4b71Sopenharmony_ci
1922e41f4b71Sopenharmony_ciSets the pointer size. This API returns the result synchronously.
1923e41f4b71Sopenharmony_ci
1924e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1925e41f4b71Sopenharmony_ci
1926e41f4b71Sopenharmony_ci**System API**: This is a system API.
1927e41f4b71Sopenharmony_ci
1928e41f4b71Sopenharmony_ci**Parameters**
1929e41f4b71Sopenharmony_ci
1930e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
1931e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
1932e41f4b71Sopenharmony_ci| size  | number | Yes   | Pointer size. The value ranges from **1** to **7**. The default value is **1**.|
1933e41f4b71Sopenharmony_ci
1934e41f4b71Sopenharmony_ci**Error codes**
1935e41f4b71Sopenharmony_ci
1936e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1937e41f4b71Sopenharmony_ci
1938e41f4b71Sopenharmony_ci| ID | Error Message            |
1939e41f4b71Sopenharmony_ci| ---- | --------------------- |
1940e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1941e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1942e41f4b71Sopenharmony_ci
1943e41f4b71Sopenharmony_ci**Example**
1944e41f4b71Sopenharmony_ci
1945e41f4b71Sopenharmony_ci```js
1946e41f4b71Sopenharmony_citry {
1947e41f4b71Sopenharmony_ci  pointer.setPointerSizeSync(5);
1948e41f4b71Sopenharmony_ci  console.log(`setPointerSizeSync success`);
1949e41f4b71Sopenharmony_ci} catch (error) {
1950e41f4b71Sopenharmony_ci  console.log(`setPointerSizeSync failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1951e41f4b71Sopenharmony_ci}
1952e41f4b71Sopenharmony_ci```
1953e41f4b71Sopenharmony_ci
1954e41f4b71Sopenharmony_ci## pointer.getPointerSize<sup>10+</sup>
1955e41f4b71Sopenharmony_ci
1956e41f4b71Sopenharmony_cigetPointerSize(callback: AsyncCallback&lt;number&gt;): void
1957e41f4b71Sopenharmony_ci
1958e41f4b71Sopenharmony_ciObtains the pointer size. This API uses an asynchronous callback to return the result.
1959e41f4b71Sopenharmony_ci
1960e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1961e41f4b71Sopenharmony_ci
1962e41f4b71Sopenharmony_ci**System API**: This is a system API.
1963e41f4b71Sopenharmony_ci
1964e41f4b71Sopenharmony_ci**Parameters**
1965e41f4b71Sopenharmony_ci
1966e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
1967e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
1968e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;number&gt; | Yes   | Callback used to return the result.|
1969e41f4b71Sopenharmony_ci
1970e41f4b71Sopenharmony_ci**Error codes**
1971e41f4b71Sopenharmony_ci
1972e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
1973e41f4b71Sopenharmony_ci
1974e41f4b71Sopenharmony_ci| ID | Error Message            |
1975e41f4b71Sopenharmony_ci| ---- | --------------------- |
1976e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
1977e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
1978e41f4b71Sopenharmony_ci
1979e41f4b71Sopenharmony_ci**Example**
1980e41f4b71Sopenharmony_ci
1981e41f4b71Sopenharmony_ci```js
1982e41f4b71Sopenharmony_citry {
1983e41f4b71Sopenharmony_ci  pointer.getPointerSize((error: Error, size: number) => {
1984e41f4b71Sopenharmony_ci    console.log(`getPointerSize success, size: ${JSON.stringify(size)}`);
1985e41f4b71Sopenharmony_ci  });
1986e41f4b71Sopenharmony_ci} catch (error) {
1987e41f4b71Sopenharmony_ci  console.log(`getPointerSize failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
1988e41f4b71Sopenharmony_ci}
1989e41f4b71Sopenharmony_ci```
1990e41f4b71Sopenharmony_ci
1991e41f4b71Sopenharmony_ci## pointer.getPointerSize<sup>10+</sup>
1992e41f4b71Sopenharmony_ci
1993e41f4b71Sopenharmony_cigetPointerSize(): Promise&lt;number&gt;
1994e41f4b71Sopenharmony_ci
1995e41f4b71Sopenharmony_ciObtains the pointer size. This API uses a promise to return the result.
1996e41f4b71Sopenharmony_ci
1997e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
1998e41f4b71Sopenharmony_ci
1999e41f4b71Sopenharmony_ci**System API**: This is a system API.
2000e41f4b71Sopenharmony_ci
2001e41f4b71Sopenharmony_ci**Return value**
2002e41f4b71Sopenharmony_ci
2003e41f4b71Sopenharmony_ci| Name                   | Description                 |
2004e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
2005e41f4b71Sopenharmony_ci| Promise&lt;number&gt; | Promise used to return the result.|
2006e41f4b71Sopenharmony_ci
2007e41f4b71Sopenharmony_ci**Error codes**
2008e41f4b71Sopenharmony_ci
2009e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2010e41f4b71Sopenharmony_ci
2011e41f4b71Sopenharmony_ci| ID | Error Message            |
2012e41f4b71Sopenharmony_ci| ---- | --------------------- |
2013e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2014e41f4b71Sopenharmony_ci
2015e41f4b71Sopenharmony_ci
2016e41f4b71Sopenharmony_ci**Example**
2017e41f4b71Sopenharmony_ci
2018e41f4b71Sopenharmony_ci```js
2019e41f4b71Sopenharmony_citry {
2020e41f4b71Sopenharmony_ci  pointer.getPointerSize().then((size: number) => {
2021e41f4b71Sopenharmony_ci    console.log(`getPointerSize success, size: ${JSON.stringify(size)}`);
2022e41f4b71Sopenharmony_ci  });
2023e41f4b71Sopenharmony_ci} catch (error) {
2024e41f4b71Sopenharmony_ci  console.log(`getPointerSize failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2025e41f4b71Sopenharmony_ci}
2026e41f4b71Sopenharmony_ci```
2027e41f4b71Sopenharmony_ci
2028e41f4b71Sopenharmony_ci## pointer.getPointerSizeSync<sup>10+</sup>
2029e41f4b71Sopenharmony_ci
2030e41f4b71Sopenharmony_cigetPointerSizeSync(): number
2031e41f4b71Sopenharmony_ci
2032e41f4b71Sopenharmony_ciObtains the pointer size. This API returns the result synchronously.
2033e41f4b71Sopenharmony_ci
2034e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
2035e41f4b71Sopenharmony_ci
2036e41f4b71Sopenharmony_ci**System API**: This is a system API.
2037e41f4b71Sopenharmony_ci
2038e41f4b71Sopenharmony_ci**Return value**
2039e41f4b71Sopenharmony_ci
2040e41f4b71Sopenharmony_ci| Name                   | Description                 |
2041e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
2042e41f4b71Sopenharmony_ci| number | Pointer size. |
2043e41f4b71Sopenharmony_ci
2044e41f4b71Sopenharmony_ci**Error codes**
2045e41f4b71Sopenharmony_ci
2046e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2047e41f4b71Sopenharmony_ci
2048e41f4b71Sopenharmony_ci| ID | Error Message            |
2049e41f4b71Sopenharmony_ci| ---- | --------------------- |
2050e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2051e41f4b71Sopenharmony_ci
2052e41f4b71Sopenharmony_ci
2053e41f4b71Sopenharmony_ci**Example**
2054e41f4b71Sopenharmony_ci
2055e41f4b71Sopenharmony_ci```js
2056e41f4b71Sopenharmony_citry {
2057e41f4b71Sopenharmony_ci  let pointerSize = pointer.getPointerSizeSync();
2058e41f4b71Sopenharmony_ci  console.log(`getPointerSizeSync success, pointerSize: ${JSON.stringify(pointerSize)}`);
2059e41f4b71Sopenharmony_ci} catch (error) {
2060e41f4b71Sopenharmony_ci  console.log(`getPointerSizeSync failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2061e41f4b71Sopenharmony_ci}
2062e41f4b71Sopenharmony_ci```
2063e41f4b71Sopenharmony_ci
2064e41f4b71Sopenharmony_ci## pointer.setPointerColor<sup>10+</sup>
2065e41f4b71Sopenharmony_ci
2066e41f4b71Sopenharmony_cisetPointerColor(color: number, callback: AsyncCallback&lt;void&gt;): void
2067e41f4b71Sopenharmony_ci
2068e41f4b71Sopenharmony_ciSets the pointer color. This API uses an asynchronous callback to return the result.
2069e41f4b71Sopenharmony_ci
2070e41f4b71Sopenharmony_ci**NOTE**
2071e41f4b71Sopenharmony_ci>
2072e41f4b71Sopenharmony_ci> When performing this operation, you need to connect an external device, such as a mouse or Bluetooth device.
2073e41f4b71Sopenharmony_ci
2074e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
2075e41f4b71Sopenharmony_ci
2076e41f4b71Sopenharmony_ci**System API**: This is a system API.
2077e41f4b71Sopenharmony_ci
2078e41f4b71Sopenharmony_ci**Parameters**
2079e41f4b71Sopenharmony_ci
2080e41f4b71Sopenharmony_ci| Name      | Type                       | Mandatory  | Description                                   |
2081e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ------------------------------------- |
2082e41f4b71Sopenharmony_ci| color     | number                    | Yes   | Pointer color. The default value is **black** (0x000000).  |
2083e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;void&gt; | Yes   | Callback used to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error object.|
2084e41f4b71Sopenharmony_ci
2085e41f4b71Sopenharmony_ci**Error codes**
2086e41f4b71Sopenharmony_ci
2087e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2088e41f4b71Sopenharmony_ci
2089e41f4b71Sopenharmony_ci| ID | Error Message            |
2090e41f4b71Sopenharmony_ci| ---- | --------------------- |
2091e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2092e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
2093e41f4b71Sopenharmony_ci
2094e41f4b71Sopenharmony_ci**Example**
2095e41f4b71Sopenharmony_ci
2096e41f4b71Sopenharmony_ci```js
2097e41f4b71Sopenharmony_citry {
2098e41f4b71Sopenharmony_ci  pointer.setPointerColor(0xF6C800, (error: Error) => {
2099e41f4b71Sopenharmony_ci    if (error) {
2100e41f4b71Sopenharmony_ci      console.log(`setPointerColor failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2101e41f4b71Sopenharmony_ci      return;
2102e41f4b71Sopenharmony_ci    }
2103e41f4b71Sopenharmony_ci    console.log(`setPointerColor success`);
2104e41f4b71Sopenharmony_ci  });
2105e41f4b71Sopenharmony_ci} catch (error) {
2106e41f4b71Sopenharmony_ci  console.log(`setPointerColor failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2107e41f4b71Sopenharmony_ci}
2108e41f4b71Sopenharmony_ci```
2109e41f4b71Sopenharmony_ci
2110e41f4b71Sopenharmony_ci## pointer.setPointerColor<sup>10+</sup>
2111e41f4b71Sopenharmony_ci
2112e41f4b71Sopenharmony_cisetPointerColor(color: number): Promise&lt;void&gt;
2113e41f4b71Sopenharmony_ci
2114e41f4b71Sopenharmony_ciSets the pointer color. This API uses a promise to return the result.
2115e41f4b71Sopenharmony_ci
2116e41f4b71Sopenharmony_ci**NOTE**
2117e41f4b71Sopenharmony_ci>
2118e41f4b71Sopenharmony_ci> When performing this operation, you need to connect an external device, such as a mouse or Bluetooth device.
2119e41f4b71Sopenharmony_ci
2120e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
2121e41f4b71Sopenharmony_ci
2122e41f4b71Sopenharmony_ci**System API**: This is a system API.
2123e41f4b71Sopenharmony_ci
2124e41f4b71Sopenharmony_ci**Parameters**
2125e41f4b71Sopenharmony_ci
2126e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
2127e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
2128e41f4b71Sopenharmony_ci| color  | number | Yes   | Pointer color. The default value is **black** (0x000000).|
2129e41f4b71Sopenharmony_ci
2130e41f4b71Sopenharmony_ci**Return value**
2131e41f4b71Sopenharmony_ci
2132e41f4b71Sopenharmony_ci| Name                 | Description              |
2133e41f4b71Sopenharmony_ci| ------------------- | ---------------- |
2134e41f4b71Sopenharmony_ci| Promise&lt;void&gt; | Promise that returns no value.|
2135e41f4b71Sopenharmony_ci
2136e41f4b71Sopenharmony_ci**Error codes**
2137e41f4b71Sopenharmony_ci
2138e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2139e41f4b71Sopenharmony_ci
2140e41f4b71Sopenharmony_ci| ID | Error Message            |
2141e41f4b71Sopenharmony_ci| ---- | --------------------- |
2142e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2143e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
2144e41f4b71Sopenharmony_ci
2145e41f4b71Sopenharmony_ci**Example**
2146e41f4b71Sopenharmony_ci
2147e41f4b71Sopenharmony_ci```js
2148e41f4b71Sopenharmony_citry {
2149e41f4b71Sopenharmony_ci  pointer.setPointerColor(0xF6C800).then(() => {
2150e41f4b71Sopenharmony_ci    console.log(`setPointerColor success`);
2151e41f4b71Sopenharmony_ci  });
2152e41f4b71Sopenharmony_ci} catch (error) {
2153e41f4b71Sopenharmony_ci  console.log(`setPointerColor failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2154e41f4b71Sopenharmony_ci}
2155e41f4b71Sopenharmony_ci```
2156e41f4b71Sopenharmony_ci
2157e41f4b71Sopenharmony_ci## pointer.setPointerColorSync<sup>10+</sup>
2158e41f4b71Sopenharmony_ci
2159e41f4b71Sopenharmony_cisetPointerColorSync(color: number): void;
2160e41f4b71Sopenharmony_ci
2161e41f4b71Sopenharmony_ciSets the pointer color. This API returns the result synchronously.
2162e41f4b71Sopenharmony_ci
2163e41f4b71Sopenharmony_ci**NOTE**
2164e41f4b71Sopenharmony_ci>
2165e41f4b71Sopenharmony_ci> When performing this operation, you need to connect an external device, such as a mouse or Bluetooth device.
2166e41f4b71Sopenharmony_ci
2167e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
2168e41f4b71Sopenharmony_ci
2169e41f4b71Sopenharmony_ci**System API**: This is a system API.
2170e41f4b71Sopenharmony_ci
2171e41f4b71Sopenharmony_ci**Parameters**
2172e41f4b71Sopenharmony_ci
2173e41f4b71Sopenharmony_ci| Name   | Type    | Mandatory  | Description                                 |
2174e41f4b71Sopenharmony_ci| ----- | ------ | ---- | ----------------------------------- |
2175e41f4b71Sopenharmony_ci| color  | number | Yes   | Pointer color. The default value is **black** (0x000000).|
2176e41f4b71Sopenharmony_ci
2177e41f4b71Sopenharmony_ci**Error codes**
2178e41f4b71Sopenharmony_ci
2179e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2180e41f4b71Sopenharmony_ci
2181e41f4b71Sopenharmony_ci| ID | Error Message            |
2182e41f4b71Sopenharmony_ci| ---- | --------------------- |
2183e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2184e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
2185e41f4b71Sopenharmony_ci
2186e41f4b71Sopenharmony_ci**Example**
2187e41f4b71Sopenharmony_ci
2188e41f4b71Sopenharmony_ci```js
2189e41f4b71Sopenharmony_citry {
2190e41f4b71Sopenharmony_ci  pointer.setPointerColorSync(0xF6C800);
2191e41f4b71Sopenharmony_ci  console.log(`setPointerColorSync success`);
2192e41f4b71Sopenharmony_ci} catch (error) {
2193e41f4b71Sopenharmony_ci  console.log(`setPointerColorSync failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2194e41f4b71Sopenharmony_ci}
2195e41f4b71Sopenharmony_ci```
2196e41f4b71Sopenharmony_ci
2197e41f4b71Sopenharmony_ci## pointer.getPointerColor<sup>10+</sup>
2198e41f4b71Sopenharmony_ci
2199e41f4b71Sopenharmony_cigetPointerColor(callback: AsyncCallback&lt;number&gt;): void
2200e41f4b71Sopenharmony_ci
2201e41f4b71Sopenharmony_ciObtains the pointer color. This API uses an asynchronous callback to return the result.
2202e41f4b71Sopenharmony_ci
2203e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
2204e41f4b71Sopenharmony_ci
2205e41f4b71Sopenharmony_ci**System API**: This is a system API.
2206e41f4b71Sopenharmony_ci
2207e41f4b71Sopenharmony_ci**Parameters**
2208e41f4b71Sopenharmony_ci
2209e41f4b71Sopenharmony_ci| Name      | Type                         | Mandatory  | Description            |
2210e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | -------------- |
2211e41f4b71Sopenharmony_ci| callback | AsyncCallback&lt;number&gt; | Yes   | Callback used to return the result.|
2212e41f4b71Sopenharmony_ci
2213e41f4b71Sopenharmony_ci**Error codes**
2214e41f4b71Sopenharmony_ci
2215e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2216e41f4b71Sopenharmony_ci
2217e41f4b71Sopenharmony_ci| ID | Error Message            |
2218e41f4b71Sopenharmony_ci| ---- | --------------------- |
2219e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2220e41f4b71Sopenharmony_ci| 401  | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;2. Incorrect parameter types; 3. Parameter verification failed. |
2221e41f4b71Sopenharmony_ci
2222e41f4b71Sopenharmony_ci**Example**
2223e41f4b71Sopenharmony_ci
2224e41f4b71Sopenharmony_ci```js
2225e41f4b71Sopenharmony_citry {
2226e41f4b71Sopenharmony_ci  pointer.getPointerColor((error: Error, color: number) => {
2227e41f4b71Sopenharmony_ci    console.log(`getPointerColor success, color: ${JSON.stringify(color)}`);
2228e41f4b71Sopenharmony_ci  });
2229e41f4b71Sopenharmony_ci} catch (error) {
2230e41f4b71Sopenharmony_ci  console.log(`getPointerColor failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2231e41f4b71Sopenharmony_ci}
2232e41f4b71Sopenharmony_ci```
2233e41f4b71Sopenharmony_ci
2234e41f4b71Sopenharmony_ci## pointer.getPointerColor<sup>10+</sup>
2235e41f4b71Sopenharmony_ci
2236e41f4b71Sopenharmony_cigetPointerColor(): Promise&lt;number&gt;
2237e41f4b71Sopenharmony_ci
2238e41f4b71Sopenharmony_ciObtains the pointer color. This API uses a promise to return the result.
2239e41f4b71Sopenharmony_ci
2240e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
2241e41f4b71Sopenharmony_ci
2242e41f4b71Sopenharmony_ci**System API**: This is a system API.
2243e41f4b71Sopenharmony_ci
2244e41f4b71Sopenharmony_ci**Return value**
2245e41f4b71Sopenharmony_ci
2246e41f4b71Sopenharmony_ci| Name                   | Description                 |
2247e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
2248e41f4b71Sopenharmony_ci| Promise&lt;number&gt; | Promise used to return the result.|
2249e41f4b71Sopenharmony_ci
2250e41f4b71Sopenharmony_ci**Error codes**
2251e41f4b71Sopenharmony_ci
2252e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2253e41f4b71Sopenharmony_ci
2254e41f4b71Sopenharmony_ci| ID | Error Message            |
2255e41f4b71Sopenharmony_ci| ---- | --------------------- |
2256e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2257e41f4b71Sopenharmony_ci
2258e41f4b71Sopenharmony_ci
2259e41f4b71Sopenharmony_ci**Example**
2260e41f4b71Sopenharmony_ci
2261e41f4b71Sopenharmony_ci```js
2262e41f4b71Sopenharmony_citry {
2263e41f4b71Sopenharmony_ci  pointer.getPointerColor().then((color: number) => {
2264e41f4b71Sopenharmony_ci    console.log(`getPointerColor success, color: ${JSON.stringify(color)}`);
2265e41f4b71Sopenharmony_ci  });
2266e41f4b71Sopenharmony_ci} catch (error) {
2267e41f4b71Sopenharmony_ci  console.log(`getPointerColor failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2268e41f4b71Sopenharmony_ci}
2269e41f4b71Sopenharmony_ci```
2270e41f4b71Sopenharmony_ci
2271e41f4b71Sopenharmony_ci## pointer.getPointerColorSync<sup>10+</sup>
2272e41f4b71Sopenharmony_ci
2273e41f4b71Sopenharmony_cigetPointerColorSync(): number
2274e41f4b71Sopenharmony_ci
2275e41f4b71Sopenharmony_ciObtains the pointer color. This API returns the result synchronously.
2276e41f4b71Sopenharmony_ci
2277e41f4b71Sopenharmony_ci**System capability**: SystemCapability.MultimodalInput.Input.Pointer
2278e41f4b71Sopenharmony_ci
2279e41f4b71Sopenharmony_ci**System API**: This is a system API.
2280e41f4b71Sopenharmony_ci
2281e41f4b71Sopenharmony_ci**Return value**
2282e41f4b71Sopenharmony_ci
2283e41f4b71Sopenharmony_ci| Name                   | Description                 |
2284e41f4b71Sopenharmony_ci| --------------------- | ------------------- |
2285e41f4b71Sopenharmony_ci| number | Pointer color.|
2286e41f4b71Sopenharmony_ci
2287e41f4b71Sopenharmony_ci**Error codes**
2288e41f4b71Sopenharmony_ci
2289e41f4b71Sopenharmony_ciFor details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
2290e41f4b71Sopenharmony_ci
2291e41f4b71Sopenharmony_ci| ID | Error Message            |
2292e41f4b71Sopenharmony_ci| ---- | --------------------- |
2293e41f4b71Sopenharmony_ci| 202  | SystemAPI permission error.  |
2294e41f4b71Sopenharmony_ci
2295e41f4b71Sopenharmony_ci
2296e41f4b71Sopenharmony_ci**Example**
2297e41f4b71Sopenharmony_ci
2298e41f4b71Sopenharmony_ci```js
2299e41f4b71Sopenharmony_citry {
2300e41f4b71Sopenharmony_ci  let pointerColor = pointer.getPointerColorSync();
2301e41f4b71Sopenharmony_ci  console.log(`getPointerColorSync success, pointerColor: ${JSON.stringify(pointerColor)}`);
2302e41f4b71Sopenharmony_ci} catch (error) {
2303e41f4b71Sopenharmony_ci  console.log(`getPointerColorSync failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
2304e41f4b71Sopenharmony_ci}
2305e41f4b71Sopenharmony_ci```
2306