捕获所有键盘输入 [英] Capture All Keyboard Input

查看:51
本文介绍了捕获所有键盘输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我知道这可以用于键盘记录器.我不打算这样做,我希望制作一个应用程序来侦听自定义组合键,只是为了自动执行一些非常烦人的任务.

First off, I know this could be used for a keylogger. I'm not going for that, I'm looking to make an application that listens for custom key combinations just to automate a few really annoying tasks.

有什么方法可以从键盘捕获所有输入吗?

Is there some way to capture all input from the keyboard?

推荐答案

您似乎正在寻找 RegisterHotKey().

You appear to be looking for RegisterHotKey().

我认为您不想挂钩所有键盘输入.您只需要一个带有隐藏窗口的应用程序,可以监听 WM_HOTKEY.我认为你甚至不需要自己写.有很多实用程序可以为您完成这项工作,并让您将系统范围的热键与您的规范操作相关联,例如AutoHotKey.

I don't think you want to hook all keyboard input. You simply want an app with a hidden window listening for WM_HOTKEY. I don't think you even need to write it yourself. There are a lots of utilities that will do it for you and let you associate system-wide hot keys with actions of your specification, e.g. AutoHotKey.

这篇关于捕获所有键盘输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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