拦截鼠标输入 [英] Intercept mouse input

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

问题描述

我在想,如果有就截获并修改鼠标输入它获取到Windows之前的方法?

I was wondering if there is a way to intercept and modify mouse input before it gets to windows?

什么我想要做的是拦截鼠标移动事件,适用于一些自定义缩放和加速度的值,然后继续沿传递它们。我需要的东西,可以做到这一点之前,投入到原始输入API或DirectInput的。

What I'm wanting to do is intercept mouse motion events, apply some custom scaling and acceleration to the values, and then continue passing them along. I'd need something that can do this before the inputs get to the raw input API or DirectInput.

推荐答案

为了影响到所有鼠标输入,包括DirectInput的,登录和SAS屏等过程中,你需要一个过滤器驱动程序加载到鼠标驱动程序堆栈。

In order to affect all mouse input, including DirectInput, during logon and the SAS screen, etc., you'll need to load a filter driver into the mouse driver stack.

其他人都做到了,比如 http://www.maf-soft.de/mafmouse /

Other people have done it, for example http://www.maf-soft.de/mafmouse/

有应该在Windows DDK一个 moufiltr 样品,你可以作为一个起点使用。你很可能要用于开发一个虚拟机,因为在你的开发机器上的驱动程序错误可能很难恢复。

There should be a moufiltr sample in the Windows DDK which you can use as a starting point. You will most likely want to use a virtual machine for development since errors in a driver on your development machine could be difficult to recover from.

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

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