引用:<br>如何设置大写锁定键 <br> 摘 要:怎么打开大写锁定键(函数SetCapsLockKey ) <br> 关键字:keybd_event MapVirtualkey GetAsyncKeyState <br> 类 别:API <br>--------------------------------------------------------------------------------<br>函数如下:<br><br>procedure SetCapsLockKey( vcode: Integer; down: Boolean );<br>begin<br>if Odd(GetAsyncKeyState( vcode )) <> down then<br>begin<br>keybd_event( vcode, MapVirtualkey( vcode, 0 ),<br>KEYEVENTF_EXTENDEDKEY, 0);<br>keybd_event( vcode, MapVirtualkey( vcode, 0 ),<br>KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP, 0);<br>end;<br>end;<br><br>...<br><br>SetCapsLockKey( VK_CAPITAL, True ); //按下<br><br><br>'keybd_event', 'MapVirtualkey'和'GetAsyncKeyState'是win-api函数...<br>