- 新增 wyhkm.dll 硬件盒子 COM 接口封装,支持键盘鼠标控制 - 修复 game_state_config.json 中 scan_region_width 过小导致截图越界的问题 - 添加鼠标路径录制器、硬件测试脚本等工具 - 更新多项配置默认值 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
64 lines
2.8 KiB
HTML
64 lines
2.8 KiB
HTML
<!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>HKMCheckPressedKeys</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">名称</th>
|
||
<td class="name">HKMCheckPressedKeys 检查按键</td>
|
||
</tr>
|
||
<tr>
|
||
<th>功能</th>
|
||
<td>检查键盘、鼠标的哪些键被按下。在程序运行前,可能有些键盘或者鼠标的键因某种原因被按下未弹起,有的从物理上看弹起了,实际在逻辑上并未弹起。这样会影响后面的键盘、鼠标操作,所有最好先检查一下。</td>
|
||
</tr>
|
||
<tr>
|
||
<th>参数</th>
|
||
<td class="canshu">参数1 模式:无符号32位整型数。用于设置这个函数的工作方式。取值可以是下面的一个或多个,不用时可取0。如果要同时使用多个值,可将多个值做或运算。可取值:<br />
|
||
<table width="236" border="1" cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
<th width="34" scope="col"><span class="thf">值</span></th>
|
||
<th width="196" scope="col"><span class="thf">说明</span></th>
|
||
</tr>
|
||
<tr>
|
||
<td>1</td>
|
||
<td>返回的字符串包含中文的信息,否则是全英文的信息</td>
|
||
</tr>
|
||
<tr>
|
||
<td>2</td>
|
||
<td>返回的字符串包含被按下的鼠标键信息,否则只包含被按下的键盘键</td>
|
||
</tr>
|
||
<tr>
|
||
<td>4</td>
|
||
<td>返回的字符串是Ansi编码,默认是Unicode编码</td>
|
||
</tr>
|
||
</table>
|
||
参数2 字符串长度:无符号32位整型数指针。用于接收返回值为非NULL时,返回字符串的字符数,不包括字符串结束符'\0'。不需要时可以取值为NULL。</td>
|
||
</tr>
|
||
<tr>
|
||
<th>返回值</th>
|
||
<td class="fanhui">字符串(Unicode/Ansi)。如果未检测到有被按下的键,返回“OK”字符串;如果检测到有被按下的键,返回被按下的键的信息;如果失败,返回NULL。当不再使用这个字符串时,使用<a href="HKMFreeData.html">HKMFreeData</a>释放字符串所占用的资源。</td>
|
||
</tr>
|
||
<tr>
|
||
<th>C语言<br />例子</th>
|
||
<td class="lizi">LPWSTR lpStr;<br />
|
||
setlocale(LC_ALL,"chs");<span class="note">//printf输出中文Unicode字符要这样设置才能正常显示</span><br />
|
||
lpStr=HKMCheckPressedKeys(1,NULL);<br />
|
||
if(lpStr==NULL)<br />
|
||
{<br />
|
||
printf("按键检查失败\n");<br /> return 0;<br />
|
||
}<br />
|
||
if(!wcscmp(lpStr,L"OK"))<br />
|
||
{<br />
|
||
printf("检查到%S被按下,可能是按下未弹起或者键盘故障,这会影响键盘鼠标操作,为了恢复它们,请尝试重新点击这些按键!\n");<br />
|
||
HKMFreeData(lpStr);<br />
|
||
return 0;<br />
|
||
}<br />
|
||
HKMFreeData(lpStr);</td>
|
||
</tr>
|
||
</table>
|
||
</body>
|
||
</html> |