From 587af7c56def6530c801e43863b4ab53afe0af17 Mon Sep 17 00:00:00 2001 From: l30075025 Date: Tue, 17 Jun 2025 14:41:36 +0800 Subject: [PATCH 1/3] fix Signed-off-by: l30075025 --- .../device/input/inputconsumer-guidelines.md | 10 ++++++---- .../device/input/inputdevice-guidelines.md | 2 +- .../device/input/inputeventclient-guidelines.md | 4 +++- .../device/input/inputmonitor-guidelines.md | 4 ++-- .../device/input/pointerstyle-guidelines.md | 4 ++-- .../device/input/shortkey-guidelines.md | 3 ++- .../reference/apis-input-kit/js-apis-touchevent.md | 6 +++--- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/zh-cn/application-dev/device/input/inputconsumer-guidelines.md b/zh-cn/application-dev/device/input/inputconsumer-guidelines.md index a7bbd3cc10a..3ffe8c9a791 100644 --- a/zh-cn/application-dev/device/input/inputconsumer-guidelines.md +++ b/zh-cn/application-dev/device/input/inputconsumer-guidelines.md @@ -31,6 +31,8 @@ import { inputConsumer } from '@kit.InputKit'; 特定全局快捷键的应用开启时调用[on](../../reference/apis-input-kit/js-apis-inputconsumer-sys.md#inputconsumeron)方法订阅全局快捷键,应用关闭时再用[off](../../reference/apis-input-kit/js-apis-inputconsumer-sys.md#inputconsumeroff)方法取消订阅全局快捷键。 ```js +import { inputConsumer } from '@kit.InputKit'; + let leftAltKey = 2045; let tabKey = 2049; let callback = (keyOptions: inputConsumer.KeyOptions) => { @@ -41,14 +43,14 @@ let keyOption: inputConsumer.KeyOptions = {preKeys: [leftAltKey], finalKey: tabK try { inputConsumer.on("key", keyOption, callback);//订阅系统快捷键 } catch (error) { - console.log(`Execute failed, error: ${JSON.stringify(error, [`code`, `message`])}`); + console.error(`Execute failed, error: ${JSON.stringify(error, [`code`, `message`])}`); } //应用关闭 try { inputConsumer.off("key", keyOption, callback);//取消订阅系统快捷键 console.log(`Unsubscribe success`); } catch (error) { - console.log(`Execute failed, error: ${JSON.stringify(error, [`code`, `message`])}`); + console.error(`Execute failed, error: ${JSON.stringify(error, [`code`, `message`])}`); } let leftCtrlKey = 2072; @@ -65,13 +67,13 @@ inputConsumer.getAllSystemHotkeys().then((data: Array {//设置截屏应用screenshot延迟时间为5秒(500毫秒) if (error) { @@ -33,7 +34,7 @@ try { console.log(`Set key down duration success`); }); } catch (error) { - console.log(`Set key down duration failed, error: ${JSON.stringify(error, [`code`, `message`])}`); + console.error(`Set key down duration failed, error: ${JSON.stringify(error, [`code`, `message`])}`); } ``` diff --git a/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md b/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md index 04d2547c240..c3dd6adbda4 100644 --- a/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md +++ b/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md @@ -1,6 +1,6 @@ # @ohos.multimodalInput.touchEvent (触摸输入事件) -设备上报的触摸(触屏)事件,继承自[InputEvent](./js-apis-inputevent.md)。 +设备上报的触摸事件,继承自[InputEvent](./js-apis-inputevent.md)。 > **说明:** > @@ -83,13 +83,13 @@ import { Action,ToolType,SourceType,Touch,TouchEvent } from '@kit.InputKit'; ## TouchEvent -触屏事件。 +触摸事件。 **系统能力:** SystemCapability.MultimodalInput.Input.Core | 名称 | 类型 | 只读 | 可选 | 说明 | | ---------- | ---------- | ---- | ---- | --------- | -| action | [Action](#action) | 否 | 否 | 触屏事件类型。 | +| action | [Action](#action) | 否 | 否 | 触摸事件类型。 | | touch | [Touch](#touch) | 否 | 否 | 当前触摸点信息。 | | touches | [Touch](#touch)[] | 否 | 否 | 所有触摸点。 | | sourceType | [SourceType](#sourcetype) | 否 | 否 | 触摸来源的设备类型。 | -- Gitee From c75c0480ec7174d2adad07416be6d9442c33703e Mon Sep 17 00:00:00 2001 From: l30075025 Date: Tue, 17 Jun 2025 19:14:40 +0800 Subject: [PATCH 2/3] fix Signed-off-by: l30075025 --- .../reference/apis-input-kit/Readme-CN.md | 4 +- .../capi-input-interceptoreventcallback.md | 10 ++--- .../js-apis-inputmonitor-sys.md | 14 +++--- .../apis-input-kit/js-apis-touchevent-sys.md | 8 ++-- .../apis-input-kit/js-apis-touchevent.md | 44 +++++++++---------- zh-cn/application-dev/website.md | 4 +- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/zh-cn/application-dev/reference/apis-input-kit/Readme-CN.md b/zh-cn/application-dev/reference/apis-input-kit/Readme-CN.md index 07981df1c32..6bc791795f1 100644 --- a/zh-cn/application-dev/reference/apis-input-kit/Readme-CN.md +++ b/zh-cn/application-dev/reference/apis-input-kit/Readme-CN.md @@ -9,7 +9,7 @@ - [@ohos.multimodalInput.mouseEvent (鼠标输入事件)](js-apis-mouseevent.md) - [@ohos.multimodalInput.gestureEvent (手势事件)](js-apis-multimodalinput-gestureevent.md) - [@ohos.multimodalInput.pointer (鼠标指针)](js-apis-pointer.md) - - [@ohos.multimodalInput.touchEvent (触摸输入事件)](js-apis-touchevent.md) + - [@ohos.multimodalInput.touchEvent (触屏输入事件)](js-apis-touchevent.md) - [@ohos.multimodalInput.infraredEmitter (红外管理)](js-apis-infraredemitter.md) - [@ohos.multimodalInput.inputConsumer (全局快捷键)](js-apis-inputconsumer.md) @@ -20,7 +20,7 @@ - [@ohos.multimodalInput.inputEventClient (输入事件注入)(系统接口)](js-apis-inputeventclient-sys.md) - [@ohos.multimodalInput.inputMonitor (输入监听)(系统接口)](js-apis-inputmonitor-sys.md) - [@ohos.multimodalInput.gestureEvent (手势事件)(系统接口)](js-apis-multimodalinput-gestureevent-sys.md) - - [@ohos.multimodalInput.touchEvent (触摸输入事件)(系统接口)](js-apis-touchevent-sys.md) + - [@ohos.multimodalInput.touchEvent (触屏输入事件)(系统接口)](js-apis-touchevent-sys.md) - 已停止维护的接口 - [@ohos.multimodalInput.inputDeviceCooperate (键鼠穿越)(系统接口)](js-apis-cooperate-sys.md) diff --git a/zh-cn/application-dev/reference/apis-input-kit/capi-input-interceptoreventcallback.md b/zh-cn/application-dev/reference/apis-input-kit/capi-input-interceptoreventcallback.md index 0b72c50d307..08e3e0a67d7 100644 --- a/zh-cn/application-dev/reference/apis-input-kit/capi-input-interceptoreventcallback.md +++ b/zh-cn/application-dev/reference/apis-input-kit/capi-input-interceptoreventcallback.md @@ -2,7 +2,7 @@ ## 概述 -拦截回调事件结构体,拦截鼠标事件、触摸事件和轴事件。 +拦截回调事件结构体,拦截鼠标事件、触屏事件和轴事件。 **起始版本:** 12 @@ -17,7 +17,7 @@ | 名称 | 描述 | | -- | -- | | Input_MouseEventCallback mouseCallback | 鼠标事件的回调函数。
**起始版本:** 12 | -| Input_TouchEventCallback touchCallback | 触摸事件的回调函数。
**起始版本:** 12 | +| Input_TouchEventCallback touchCallback | 触屏事件的回调函数。
**起始版本:** 12 | | Input_AxisEventCallback axisCallback | 轴事件的回调函数。
**起始版本:** 12 | @@ -27,7 +27,7 @@ | -- | -- | -- | | [typedef void (\*Input_KeyEventCallback)(const Input_KeyEvent* keyEvent)](#input_keyeventcallback) | Input_KeyEventCallback() | 按键事件的回调函数,keyEvent的生命周期为回调函数内。
**起始版本:** 12 | | [typedef void (\*Input_MouseEventCallback)(const Input_MouseEvent* mouseEvent)](#input_mouseeventcallback) | Input_MouseEventCallback() | 鼠标事件的回调函数,mouseEvent的生命周期为回调函数内。
**起始版本:** 12 | -| [typedef void (\*Input_TouchEventCallback)(const Input_TouchEvent* touchEvent)](#input_toucheventcallback) | Input_TouchEventCallback() | 触摸事件的回调函数,touchEvent的生命周期为回调函数内。
**起始版本:** 12 | +| [typedef void (\*Input_TouchEventCallback)(const Input_TouchEvent* touchEvent)](#input_toucheventcallback) | Input_TouchEventCallback() | 触屏事件的回调函数,touchEvent的生命周期为回调函数内。
**起始版本:** 12 | | [typedef void (\*Input_AxisEventCallback)(const Input_AxisEvent* axisEvent)](#input_axiseventcallback) | Input_AxisEventCallback() | 轴事件的回调函数,axisEvent的生命周期为回调函数内。
**起始版本:** 12 | | [typedef void (\*Input_DeviceAddedCallback)(int32_t deviceId)](#input_deviceaddedcallback) | Input_DeviceAddedCallback() | 回调函数,用于回调输入设备的热插事件。
**起始版本:** 13 | | [typedef void (\*Input_DeviceRemovedCallback)(int32_t deviceId)](#input_deviceremovedcallback) | Input_DeviceRemovedCallback() | 回调函数,用于回调输入设备的热拔事件。
**起始版本:** 13 | @@ -78,7 +78,7 @@ typedef void (*Input_TouchEventCallback)(const Input_TouchEvent* touchEvent) **描述** -触摸事件的回调函数,touchEvent的生命周期为回调函数内。 +触屏事件的回调函数,touchEvent的生命周期为回调函数内。 **起始版本:** 12 @@ -86,7 +86,7 @@ typedef void (*Input_TouchEventCallback)(const Input_TouchEvent* touchEvent) | 参数项 | 描述 | | -- | -- | -| const [Input_TouchEvent](capi-input-touchevent.md)* touchEvent | 触摸事件对象。 | +| const [Input_TouchEvent](capi-input-touchevent.md)* touchEvent | 触屏事件对象。 | ### Input_AxisEventCallback() diff --git a/zh-cn/application-dev/reference/apis-input-kit/js-apis-inputmonitor-sys.md b/zh-cn/application-dev/reference/apis-input-kit/js-apis-inputmonitor-sys.md index 64f484c333b..5764a0ab606 100644 --- a/zh-cn/application-dev/reference/apis-input-kit/js-apis-inputmonitor-sys.md +++ b/zh-cn/application-dev/reference/apis-input-kit/js-apis-inputmonitor-sys.md @@ -1,12 +1,12 @@ # @ohos.multimodalInput.inputMonitor (输入监听)(系统接口) -输入监听模块,提供了监听输入设备事件的能力。输入设备事件当前包括触摸(触屏)事件、鼠标输入事件和触控板输入事件。 +输入监听模块,提供了监听输入设备事件的能力。输入设备事件当前包括触屏事件、鼠标输入事件和触控板输入事件。 >**说明:** > >- 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > ->- 文档中“全局”表示整个触控屏或触控板。如监听全局触摸事件,表示触摸触控板任何位置时,整个触控板的触摸事件均被监听。 +>- 文档中“全局”表示整个触控屏或触控板。如监听全局触屏事件,表示触摸触控板任何位置时,整个触控板的触屏事件均被监听。 > >- 本模块接口均为系统接口。 @@ -20,7 +20,7 @@ import { inputMonitor } from '@kit.InputKit'; on(type: 'touch', receiver: TouchEventReceiver): void -监听全局触摸(触屏)事件。 +监听全局触屏事件。 **需要权限:** ohos.permission.INPUT_MONITORING @@ -169,7 +169,7 @@ try { off(type: 'touch', receiver?: TouchEventReceiver): void -取消监听全局触摸(触屏)事件。 +取消监听全局触屏事件。 **需要权限:** ohos.permission.INPUT_MONITORING @@ -293,7 +293,7 @@ try { (touchEvent: TouchEvent): Boolean -触摸(触屏)输入事件的回调函数。 +触屏输入事件的回调函数。 **需要权限:** ohos.permission.INPUT_MONITORING @@ -303,13 +303,13 @@ try { | 参数名 | 类型 | 必填 | 说明 | | ---------- | ---------------------------------------- | ---- | ---------------------------------------- | -| touchEvent | [TouchEvent](js-apis-touchevent.md#touchevent) | 是 | 触摸输入事件。 | +| touchEvent | [TouchEvent](js-apis-touchevent.md#touchevent) | 是 | 触屏输入事件。 | **返回值:** | 类型 | 说明 | | ------- | ---------------------------------------- | -| Boolean | 若返回true,本次触摸后续产生的事件不再分发到窗口;若返回false,本次触摸后续产生的事件还会分发到窗口。 | +| Boolean | 若返回true,本次触屏后续产生的事件不再分发到窗口;若返回false,本次触屏后续产生的事件还会分发到窗口。 | **示例:** diff --git a/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent-sys.md b/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent-sys.md index 322086d69e1..6ce6212f6be 100644 --- a/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent-sys.md +++ b/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent-sys.md @@ -1,12 +1,12 @@ -# @ohos.multimodalInput.touchEvent (触摸输入事件)(系统接口) +# @ohos.multimodalInput.touchEvent (触屏输入事件)(系统接口) -设备上报的触摸(触屏)事件,继承自[InputEvent](./js-apis-inputevent.md)。 +设备上报的触屏事件,继承自[InputEvent](./js-apis-inputevent.md)。 > **说明:** > > 本模块首批接口从API version 19开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > -> 当前页面仅包含本模块的系统接口,其他公开接口参见[@ohos.multimodalInput.touchEvent (触摸输入事件)](js-apis-touchevent.md)。 +> 当前页面仅包含本模块的系统接口,其他公开接口参见[@ohos.multimodalInput.touchEvent (触屏输入事件)](js-apis-touchevent.md)。 ## 导入模块 @@ -29,7 +29,7 @@ import { FixedMode, Touch, TouchEvent } from '@kit.InputKit'; ## Touch -触摸点信息。 +触屏点信息。 **系统能力:** SystemCapability.MultimodalInput.Input.Core diff --git a/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md b/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md index c3dd6adbda4..2fe36f3071a 100644 --- a/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md +++ b/zh-cn/application-dev/reference/apis-input-kit/js-apis-touchevent.md @@ -1,6 +1,6 @@ -# @ohos.multimodalInput.touchEvent (触摸输入事件) +# @ohos.multimodalInput.touchEvent (触屏输入事件) -设备上报的触摸事件,继承自[InputEvent](./js-apis-inputevent.md)。 +设备上报的触屏事件,继承自[InputEvent](./js-apis-inputevent.md)。 > **说明:** > @@ -14,20 +14,20 @@ import { Action,ToolType,SourceType,Touch,TouchEvent } from '@kit.InputKit'; ## Action -触摸事件类型。 +触屏事件类型。 **系统能力:** SystemCapability.MultimodalInput.Input.Core | 名称 | 值 | 说明 | | ------ | ------ | ---- | -| CANCEL | 0 | 触摸取消。 | -| DOWN | 1 | 触摸按下。 | -| MOVE | 2 | 触摸移动。 | -| UP | 3 | 触摸抬起。 | +| CANCEL | 0 | 触屏取消。 | +| DOWN | 1 | 触屏按下。 | +| MOVE | 2 | 触屏移动。 | +| UP | 3 | 触屏抬起。 | ## ToolType -操作触摸的工具类型。 +操作触屏的工具类型。 **系统能力:** SystemCapability.MultimodalInput.Input.Core @@ -44,7 +44,7 @@ import { Action,ToolType,SourceType,Touch,TouchEvent } from '@kit.InputKit'; ## SourceType -触摸来源的设备类型。 +触屏来源的设备类型。 **系统能力:** SystemCapability.MultimodalInput.Input.Core @@ -56,21 +56,21 @@ import { Action,ToolType,SourceType,Touch,TouchEvent } from '@kit.InputKit'; ## Touch -触摸点信息。 +触屏点信息。 **系统能力:** SystemCapability.MultimodalInput.Input.Core | 名称 | 类型 | 只读 | 可选 | 说明 | | ----------- | ------ | ---- | ---- | ----------------------------------- | -| id | number | 否 | 否 | 触摸事件标识。 | +| id | number | 否 | 否 | 触屏事件标识。 | | pressedTime | number | 否 | 否 | 按下时间戳,单位:μs。 | -| screenX | number | 否 | 否 | 触摸位置所属的屏幕x坐标。 | -| screenY | number | 否 | 否 | 触摸位置所属的屏幕y坐标。 | -| windowX | number | 否 | 否 | 触摸位置在窗口中的x坐标。 | -| windowY | number | 否 | 否 | 触摸位置在窗口中的y坐标。 | +| screenX | number | 否 | 否 | 触屏位置所属的屏幕x坐标。 | +| screenY | number | 否 | 否 | 触屏位置所属的屏幕y坐标。 | +| windowX | number | 否 | 否 | 触屏位置在窗口中的x坐标。 | +| windowY | number | 否 | 否 | 触屏位置在窗口中的y坐标。 | | pressure | number | 否 | 否 | 压力值,取值范围是[0.0, 1.0],0.0表示不支持。 | -| width | number | 否 | 否 | 触摸区域的宽度。 | -| height | number | 否 | 否 | 触摸区域的高度。 | +| width | number | 否 | 否 | 触屏区域的宽度。 | +| height | number | 否 | 否 | 触屏区域的高度。 | | tiltX | number | 否 | 否 | 相对YZ平面的角度,取值的范围[-90, 90],其中正值是向右倾斜。 | | tiltY | number | 否 | 否 | 相对XZ平面的角度,取值的范围[-90, 90],其中正值是向下倾斜。 | | toolX | number | 否 | 否 | 工具区域的中心点x坐标。 | @@ -83,13 +83,13 @@ import { Action,ToolType,SourceType,Touch,TouchEvent } from '@kit.InputKit'; ## TouchEvent -触摸事件。 +触屏事件。 **系统能力:** SystemCapability.MultimodalInput.Input.Core | 名称 | 类型 | 只读 | 可选 | 说明 | | ---------- | ---------- | ---- | ---- | --------- | -| action | [Action](#action) | 否 | 否 | 触摸事件类型。 | -| touch | [Touch](#touch) | 否 | 否 | 当前触摸点信息。 | -| touches | [Touch](#touch)[] | 否 | 否 | 所有触摸点。 | -| sourceType | [SourceType](#sourcetype) | 否 | 否 | 触摸来源的设备类型。 | +| action | [Action](#action) | 否 | 否 | 触屏事件类型。 | +| touch | [Touch](#touch) | 否 | 否 | 当前触屏点信息。 | +| touches | [Touch](#touch)[] | 否 | 否 | 所有触屏点。 | +| sourceType | [SourceType](#sourcetype) | 否 | 否 | 触屏来源的设备类型。 | diff --git a/zh-cn/application-dev/website.md b/zh-cn/application-dev/website.md index 088bfcc4099..a0e77579c11 100644 --- a/zh-cn/application-dev/website.md +++ b/zh-cn/application-dev/website.md @@ -4055,7 +4055,7 @@ - [@ohos.multimodalInput.mouseEvent (鼠标输入事件)](reference/apis-input-kit/js-apis-mouseevent.md) - [@ohos.multimodalInput.gestureEvent (手势事件)](reference/apis-input-kit/js-apis-multimodalinput-gestureevent.md) - [@ohos.multimodalInput.pointer (鼠标指针)](reference/apis-input-kit/js-apis-pointer.md) - - [@ohos.multimodalInput.touchEvent (触摸输入事件)](reference/apis-input-kit/js-apis-touchevent.md) + - [@ohos.multimodalInput.touchEvent (触屏输入事件)](reference/apis-input-kit/js-apis-touchevent.md) - [@ohos.multimodalInput.infraredEmitter (红外管理)](reference/apis-input-kit/js-apis-infraredemitter.md) - [@ohos.multimodalInput.inputConsumer (全局快捷键)](reference/apis-input-kit/js-apis-inputconsumer.md) @@ -4066,7 +4066,7 @@ - [@ohos.multimodalInput.inputEventClient (输入事件注入)(系统接口)](reference/apis-input-kit/js-apis-inputeventclient-sys.md) - [@ohos.multimodalInput.inputMonitor (输入监听)(系统接口)](reference/apis-input-kit/js-apis-inputmonitor-sys.md) - [@ohos.multimodalInput.gestureEvent (手势事件)(系统接口)](reference/apis-input-kit/js-apis-multimodalinput-gestureevent-sys.md) - - [@ohos.multimodalInput.touchEvent (触摸输入事件)(系统接口)](reference/apis-input-kit/js-apis-touchevent-sys.md) + - [@ohos.multimodalInput.touchEvent (触屏输入事件)(系统接口)](reference/apis-input-kit/js-apis-touchevent-sys.md) - 已停止维护的接口 - [@ohos.multimodalInput.inputDeviceCooperate (键鼠穿越)(系统接口)](reference/apis-input-kit/js-apis-cooperate-sys.md) -- Gitee From 195802d46d8a99fd7082faebaffd8c9bbcafa135 Mon Sep 17 00:00:00 2001 From: l30075025 Date: Tue, 17 Jun 2025 19:35:21 +0800 Subject: [PATCH 3/3] fix Signed-off-by: l30075025 --- zh-cn/application-dev/device/input/pointerstyle-guidelines.md | 4 ++-- zh-cn/application-dev/device/input/shortkey-guidelines.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/device/input/pointerstyle-guidelines.md b/zh-cn/application-dev/device/input/pointerstyle-guidelines.md index 560701d4ce6..a79ae652c12 100644 --- a/zh-cn/application-dev/device/input/pointerstyle-guidelines.md +++ b/zh-cn/application-dev/device/input/pointerstyle-guidelines.md @@ -99,7 +99,7 @@ window.getLastWindow(this.getUIContext().getHostContext(), (error: BusinessError console.log(`Successfully set mouse pointer style`); }); } catch (error) { - console.log(`Failed to set the pointer style, error=${JSON.stringify(error)}, msg=${JSON.stringify(`message`)}`); + console.error(`Failed to set the pointer style, error=${JSON.stringify(error)}, msg=${JSON.stringify(`message`)}`); } }); // 4.取色结束 @@ -119,7 +119,7 @@ window.getLastWindow(this.getUIContext().getHostContext(), (error: BusinessError console.log(`Successfully set mouse pointer style`); }); } catch (error) { - console.log(`Failed to set the pointer style, error=${JSON.stringify(error)}, msg=${JSON.stringify(`message`)}`); + console.error(`Failed to set the pointer style, error=${JSON.stringify(error)}, msg=${JSON.stringify(`message`)}`); } }); ``` diff --git a/zh-cn/application-dev/device/input/shortkey-guidelines.md b/zh-cn/application-dev/device/input/shortkey-guidelines.md index f622fa6b7e8..04f020b5513 100644 --- a/zh-cn/application-dev/device/input/shortkey-guidelines.md +++ b/zh-cn/application-dev/device/input/shortkey-guidelines.md @@ -28,7 +28,7 @@ import { shortKey } from '@kit.InputKit'; try { shortKey.setKeyDownDuration("screenshot", 500, (error) => {//设置截屏应用screenshot延迟时间为5秒(500毫秒) if (error) { - console.log(`Set key down duration failed, error: ${JSON.stringify(error, [`code`, `message`])}`); + console.error(`Set key down duration failed, error: ${JSON.stringify(error, [`code`, `message`])}`); return; } console.log(`Set key down duration success`); -- Gitee