---
name: luoke-input
description: '洛克王国：世界在 Windows 下的键鼠执行技能。用于发送按下/松开/输入/点击/移动等控制命令，可配合 hwnd 聚焦提升稳定性。适用于游戏操作，不用于表单填写或通用桌面自动化。'
metadata:
  requires:
    platform: windows
    bins: ["python3"]
    driver: interception
---

# 游戏输入（Interception 驱动）

**平台：仅 Windows** - 需要已安装 Interception 驱动

通过 Interception 驱动进行硬件级键盘和鼠标输入模拟。

## 前置条件

**必须先安装 Interception 驱动**（见安装文档）。

## 能力

- **键盘**：按下/松开按键、输入文本
- **鼠标**：移动、点击、滚轮

## 用法

### 键盘

```bash
# 按下按键
python3 {baseDir}/scripts/send_key.py press w

# 松开按键
python3 {baseDir}/scripts/send_key.py release w

# 输入文本
python3 {baseDir}/scripts/send_key.py type "hello"
```

### 鼠标

```bash
# 移动到坐标
python3 {baseDir}/scripts/send_mouse.py move 100 200

# 点击
python3 {baseDir}/scripts/send_mouse.py click left

# 右键点击
python3 {baseDir}/scripts/send_mouse.py click right
```

## 常用按键

常见按键：`w`、`a`、`s`、`d`、`space`、`shift`、`ctrl`、`esc`、`enter`

## 参数说明

| 命令 | 参数 | 说明 |
|------|------|------|
| press | key | 按下并保持按键 |
| release | key | 松开按键 |
| type | text | 输入文本字符串 |
| move | x y | 移动鼠标到指定坐标 |
| click | button | 点击鼠标按键（left/right/middle） |
