全球键盘钩子(C#) [英] Global Keyboard Hooks (C#)

查看:157
本文介绍了全球键盘钩子(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
在C#应用程序全球键盘捕获

任何人都可以帮我安装我的应用程序的全局键盘钩子?

Can anyone help me setup a global keyboard hook for my application?

我想设置的热键(如<大骨节病>控制 + <大骨节病>取值),当不集中的实际形态上都可以使用。

I want to set hotkeys (such as Ctrl+S) that can be used when not focused on the actual form.

推荐答案

保罗的帖子链接到两个答案,一是告诉你如何实行挂钩,另外告诉你打电话RegisterHotKey。你不应该需要安装一个按Ctrl + S热键简单的东西钩,所以叫 RegisterHotKey 代替。

Paul's post links to two answers, one telling you how to implement a hook, and another telling you to call RegisterHotKey. You shouldn't need to install a hook for something as simple as a Ctrl+S hotkey, so call RegisterHotKey instead.

这篇关于全球键盘钩子(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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