如何陷阱击键. [英] How to Trap Key strokes.

查看:85
本文介绍了如何陷阱击键.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

团队,
我想创建一个在后台运行的程序(隐藏).但是,无论何时用户尝试敲击键盘,我的程序都必须能够跟踪哪个键被击中.您能否指导我如何实现此目标,或实现该目标需要经历的任何主题.

问候,
Kiran

Hi Team,
I would like to create a program which runs in the background ( hidden ). But when ever the user tries to hit the key board my program must be able to track which key is hit. Can you please guide me how can i achieve this or any topic i need to go through for achieving this.

Regards,
Kiran

推荐答案

使用系统 Hooks 解决了这些问题.在您的情况下,将需要 Global Hooks ,这总之要求将钩子代码放置在单独的DLL中.

要了解如何执行此操作,请从此处开始:
http://msdn.microsoft.com/en-us/library/ms644959 (v = VS.85).aspx [ http://msdn.microsoft.com/en-us/library/ms644960 (v = VS.85).aspx [
Such problems are solved using system Hooks. In your case, it will require Global Hooks, which in term requires that the hook code is placed in a separate DLL.

To learn how to do this, start here:
http://msdn.microsoft.com/en-us/library/ms644959(v=VS.85).aspx[^],
http://msdn.microsoft.com/en-us/library/ms644960(v=VS.85).aspx[^].

—SA


这篇关于如何陷阱击键.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆