C#非常简单的键盘挂钩 [英] C# very simple keyboard hook
问题描述
任何人都可以告诉我如何创建基本上可以执行的键盘挂钩:
一旦按下任意键,则将int密钥代码设置为一种方法(我认为VK代码正是我所需要的?)
我在网上发现的言词似乎太复杂了:/
谢谢:)
一个简单的C#全局CodeProject上的低级键盘钩似乎是正确的.当我搜索键盘钩"时,这是Google上的第二大热门,而当您搜索确切名称时,这是第一大热门.你试过了吗?
im trying to create a custom macro program in C# and I want to know how I can create a low level keyboard hook. I have looked around and have found some but i do not understand how they work or how i can customise it :/
can anyone show me how I can create a keyboard hook that basically does:
once any key is pressed, the int keycode is set to a method (i think the VK code is what i need?)
the exampels i find online seem too complicated for that :/
Thanks :)
A Simple C# Global Low Level Keyboard Hook on CodeProject seems about right. It was the second hit on Google when I searched for 'keyboard hook' and the first when I searched for your exact title. Have you tried it?
这篇关于C#非常简单的键盘挂钩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!