add 硬件控制模块 (hardware_control.py) 并修复游戏状态扫描区域宽度

- 新增 wyhkm.dll 硬件盒子 COM 接口封装,支持键盘鼠标控制
- 修复 game_state_config.json 中 scan_region_width 过小导致截图越界的问题
- 添加鼠标路径录制器、硬件测试脚本等工具
- 更新多项配置默认值

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
王鹏
2026-04-15 12:15:00 +08:00
parent b4de5278ed
commit 33dc741fd9
203 changed files with 12197 additions and 247 deletions

View File

@@ -0,0 +1,64 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>HKMGetKeyboardLEDState</title>
<link rel="stylesheet" type="text/css" href="css/help.css">
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="ts">
<tr>
<th width="50"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td class="name">HKMGetKeyboardLEDState <20><><EFBFBD>ü<EFBFBD><C3BC><EFBFBD>LED<45><44>״̬</td>
</tr>
<tr>
<th><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td><EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD>Num Lock<63><6B>Caps Lock<63><6B>Scroll Lock<63>Ƶ<EFBFBD>״̬<D7B4><CCAC></td>
</tr>
<tr>
<th><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td class="canshu"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD>ʹ<EFBFBD><EFBFBD><a href="HKMOpen.html">HKMOpen</a><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br />
<20><><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>̵ƣ<CCB5><C6A3>޷<EFBFBD><DEB7><EFBFBD>32λ<32><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡֵ<C8A1><D6B5><EFBFBD>£<EFBFBD><br />
<table width="211" border="1" cellpadding="0" cellspacing="0">
<tr>
<th width="32" scope="col"><span class="thf">ֵ</span></th>
<th width="173" scope="col"><span class="thf">˵<EFBFBD><EFBFBD></span></th>
</tr>
<tr>
<td>0</td>
<td>Num Lock<63><6B></td>
</tr>
<tr>
<td>1</td>
<td>Caps Lock<63><6B></td>
</tr>
<tr>
<td>2</td>
<td>Scroll Lock<63><6B></td>
</tr>
</table></td>
</tr>
<tr>
<th><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ</th>
<td class="fanhui"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>TRUE<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>𷵻<EFBFBD>FALSE<EFBFBD><EFBFBD></td>
</tr>
<tr>
<th>C<EFBFBD><EFBFBD><EFBFBD><EFBFBD><br /><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td class="lizi">DWORD dwDevId;<br />
LPVOID lpDev;<br />
dwDevId=HKMSearchDevice(0x1234,0xABCD,0);<br />
if(dwDevId==0xFFFFFFFF)<br />
{<br /> &nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;δ<EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n&quot;);<br /> &nbsp;&nbsp;&nbsp;&nbsp;return 0;<br />
}<br />
lpDev=HKMOpen(dwDevId,0);<br />
if(lpDev==NULL)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>\n&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;return 0;<br />
}<br />
printf(&quot;NumLock<EFBFBD><EFBFBD>%s\n&quot;,HKMGetKeyboardLEDState(lpDev,0)?&quot;<EFBFBD><EFBFBD>&quot;:&quot;<EFBFBD><EFBFBD>&quot;);<br />
HKMClose(lpDev);</td>
</tr>
</table>
</body>
</html>