这个是拦截按键消息并测试是否为ENTER键。
begin
case wParam of
WM_KEYDOWN:
fEatKeystroke := (p.vkCode = VK_RETURN);
end;
if fEatKeystroke = True then
begin
form1.ReplaceText;
end;
end;我想改成拦截按键'E'的,也不知道怎么整 大侠们帮帮忙吧 急啊
begin
case wParam of
WM_KEYDOWN:
fEatKeystroke := (p.vkCode = VK_RETURN);
end;
if fEatKeystroke = True then
begin
form1.ReplaceText;
end;
end;我想改成拦截按键'E'的,也不知道怎么整 大侠们帮帮忙吧 急啊
修改为
fEatKeystroke := (p.vkCode = 69);
[Error] Unithook.pas(78): Undeclared identifier: 'VK_E'
[Fatal Error] hook.dpr(5): Could not compile used unit 'Unithook.pas'
这个我等试试
{ VK_0 thru VK_9 are the same as ASCII '0' thru '9' ($30 - $39) }
{ VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' ($41 - $5A) }
VK_E 是不是没注册啊