ms-types 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/types/action.d.ts
CHANGED
|
@@ -172,12 +172,21 @@ declare namespace action {
|
|
|
172
172
|
function homeScreen(): boolean;
|
|
173
173
|
/**
|
|
174
174
|
* 按下按钮
|
|
175
|
-
* @param button 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
175
|
+
* @param button 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
176
176
|
* @returns 按下按钮是否成功
|
|
177
177
|
* @example action.pressButton("home")
|
|
178
178
|
*/
|
|
179
|
-
function pressButton(
|
|
180
|
-
|
|
179
|
+
function pressButton(button: "home" | "volumeup" | "volumedown"): boolean;
|
|
180
|
+
/**
|
|
181
|
+
* 模拟按下HID按钮
|
|
182
|
+
* @param button HID按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键 power 按下电源键 snapshot 按下截图键
|
|
183
|
+
* @param duration 持续时间 单位毫秒 默认20ms
|
|
184
|
+
* @returns 按下HID按钮是否成功
|
|
185
|
+
* @example action.pressHidButton("home", 200)
|
|
186
|
+
*/
|
|
187
|
+
function pressHidButton(
|
|
188
|
+
button: "home" | "volumeup" | "volumedown" | "power" | "snapshot",
|
|
189
|
+
duration?: number
|
|
181
190
|
): boolean;
|
|
182
191
|
|
|
183
192
|
/**
|
|
@@ -174,12 +174,21 @@ declare namespace $动作 {
|
|
|
174
174
|
function 回到主页(): 布尔值;
|
|
175
175
|
/**
|
|
176
176
|
* 按下按钮
|
|
177
|
-
* @param 按键 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
177
|
+
* @param 按键 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
178
178
|
* @returns 按下按钮是否成功
|
|
179
179
|
* @example $动作.按键("home")
|
|
180
180
|
*/
|
|
181
|
-
function 按键(
|
|
182
|
-
|
|
181
|
+
function 按键(按键: "home" | "volumeup" | "volumedown"): 布尔值;
|
|
182
|
+
/**
|
|
183
|
+
* 模拟按下HID按钮
|
|
184
|
+
* @param 按键 HID按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键 power 按下电源键 snapshot 按下截图键
|
|
185
|
+
* @param 持续时间 持续时间 单位毫秒 默认20ms
|
|
186
|
+
* @returns 按下HID按钮是否成功
|
|
187
|
+
* @example $动作.按键HID("home", 200)
|
|
188
|
+
*/
|
|
189
|
+
function 按键HID(
|
|
190
|
+
按键: "home" | "volumeup" | "volumedown" | "power" | "snapshot",
|
|
191
|
+
持续时间?: 数字
|
|
183
192
|
): 布尔值;
|
|
184
193
|
|
|
185
194
|
/**
|