ms-vite-plugin 1.2.7 → 1.2.8

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.
@@ -406,6 +406,36 @@ if (success) {
406
406
  }
407
407
  ```
408
408
 
409
+ ### inputSimple - 基础文本输入
410
+
411
+ 不使用剪切板或 IME,而是把文本字符数组一次性传给 Action 模块的 `sendKey`。仅支持可映射为 USB HID Keyboard/Keypad usage 的 ASCII 字符,不支持中文。
412
+
413
+ ```typescript
414
+ function inputSimple(text: string): boolean;
415
+ ```
416
+
417
+ **参数说明:**
418
+
419
+ | 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
420
+ | ------ | ------ | -------- | ------ | ---------------- |
421
+ | `text` | string | 是 | - | 要输入的文本内容 |
422
+
423
+ **返回值:**
424
+
425
+ | 类型 | 描述 |
426
+ | --------- | ------------ |
427
+ | `boolean` | 输入是否成功 |
428
+
429
+ **示例:**
430
+
431
+ ```typescript
432
+ // 一次性发送基础文本按键数组
433
+ const success = action.inputSimple("hello_123");
434
+ if (success) {
435
+ logi("成功输入基础文本");
436
+ }
437
+ ```
438
+
409
439
  ### backspace - 删除文本
410
440
 
411
441
  ```typescript
@@ -397,6 +397,36 @@ if (是否成功) {
397
397
  }
398
398
  ```
399
399
 
400
+ ### 输入简易文本
401
+
402
+ 不使用剪切板或 IME,而是把文本字符数组一次性传给动作模块的 `发送按键`。仅支持可映射为 USB HID Keyboard/Keypad usage 的 ASCII 字符,不支持中文。
403
+
404
+ ```typescript
405
+ function 输入简易文本(文本: 字符串): 布尔值;
406
+ ```
407
+
408
+ **参数说明:**
409
+
410
+ | 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
411
+ | ------ | ------ | -------- | ------ | ---------------- |
412
+ | `文本` | 字符串 | 是 | - | 要输入的文本内容 |
413
+
414
+ **返回值:**
415
+
416
+ | 类型 | 描述 |
417
+ | -------- | ------------ |
418
+ | `布尔值` | 输入是否成功 |
419
+
420
+ **示例:**
421
+
422
+ ```typescript
423
+ // 一次性发送基础文本按键数组
424
+ const 是否成功 = $动作.输入简易文本("hello_123");
425
+ if (是否成功) {
426
+ $打印信息日志("成功输入基础文本");
427
+ }
428
+ ```
429
+
400
430
  ### 删除文本
401
431
 
402
432
  ```typescript
@@ -380,6 +380,35 @@ if action.input("hello 快点JS"):
380
380
  print("成功输入文本")
381
381
  ```
382
382
 
383
+ ### inputSimple - 基础文本输入
384
+
385
+ 不使用剪切板或 IME,而是把文本字符列表一次性传给 Action 模块的 `sendKey`。仅支持可映射为 USB HID Keyboard/Keypad usage 的 ASCII 字符,不支持中文。
386
+
387
+ ```python
388
+ def inputSimple(text: str) -> bool
389
+ ```
390
+
391
+ **参数说明:**
392
+
393
+ | 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
394
+ | ------ | ---- | -------- | ------ | ---------------- |
395
+ | `text` | str | 是 | - | 要输入的文本内容 |
396
+
397
+ **返回值:**
398
+
399
+ | 类型 | 描述 |
400
+ | ------ | ------------ |
401
+ | `bool` | 输入是否成功 |
402
+
403
+ **示例:**
404
+
405
+ ```python
406
+ from kuaijs import action
407
+
408
+ if action.inputSimple("hello_123"):
409
+ print("成功输入基础文本")
410
+ ```
411
+
383
412
  ### backspace - 删除文本
384
413
 
385
414
  ```python
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-vite-plugin",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "publishConfig": {