监测在C#中特定的击键 [英] Monitoring for specific Keystrokes in C#

查看:100
本文介绍了监测在C#中特定的击键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要写一个Windows应用程序,无论重点负责监测按键。当它检测到一个特定的按键(<大骨节病>按Ctrl + V ,专),则需要执行某些操作。

I need to write a Windows application which monitors keystrokes regardless of focus. When it detects a particular keystroke (Ctrl + V, specifically), it needs to perform certain actions.

如何监控在Windows按键从C#不管焦点?

How can I monitor keystrokes in Windows from C# regardless of focus?

推荐答案

我不完全理解你的问题,但如果你想注册全局键不管你的窗口的焦点,您可以使用 RegisterHotKey 窗户API。

I am not fully understand your question, but If you would like to register global key regardless of your window focus you can use RegisterHotKey windows API.

这篇关于监测在C#中特定的击键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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