Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intercept mouse input

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

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.

like image 252
jay.lee Avatar asked Feb 12 '26 07:02

jay.lee


2 Answers

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.

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

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.

like image 94
Ben Voigt Avatar answered Feb 14 '26 19:02

Ben Voigt


Have you seen this method of intercepting mouse and keyboard input without having to make a filter driver or hook?

http://oblita.com/Interception.html

like image 30
dokosten Avatar answered Feb 14 '26 20:02

dokosten



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!