How do i interface with a mouse?
-
Hello, I have a small situation. Not quite a developer yet, so i need a top-down view from someone with experience. I have a windows 7 box, and two mice connected to it, both using the windows default driver. As you can imagine they both work as a "mouse". What do i have to do, to "manage" the input of the second mouse to make it do something else, not just mousing around? Use it's movement to map to keys, and so on and so forth. Thank you in advance.
-
Hello, I have a small situation. Not quite a developer yet, so i need a top-down view from someone with experience. I have a windows 7 box, and two mice connected to it, both using the windows default driver. As you can imagine they both work as a "mouse". What do i have to do, to "manage" the input of the second mouse to make it do something else, not just mousing around? Use it's movement to map to keys, and so on and so forth. Thank you in advance.
samoila.mircea wrote:
What do i have to do, to "manage" the input of the second mouse to make it do something else, not just mousing around? Use it's movement to map to keys, and so on and so forth.
Learn C and write your own driver. This ain't possible in .NET, AFAIK.
I are Troll :suss:
-
samoila.mircea wrote:
What do i have to do, to "manage" the input of the second mouse to make it do something else, not just mousing around? Use it's movement to map to keys, and so on and so forth.
Learn C and write your own driver. This ain't possible in .NET, AFAIK.
I are Troll :suss:
If it were only one mouse, then you'd be using a mouse-hook. There's an example on that on Fourth mouse button[^]. I doubt that this technique will work with two mouses (especially if they're identical), but you might want to give it a try before diving deeper into the system. The second alternative is to write a small application that communicates with the serial port. We got many samples on that on CodeProject, especially for .NET - the only drawback being that you're limited to mouses with an old 9 pins serial cable. In that case you'd be interpreting the signals coming from the serial port yourself, and these signals may vary per manufacturer, or even by product. I have some c experience. Do you know any paid or free video tutorials on how to do this... There aren't that much video's on driver-development, you'd best start off with the Windows Driver Kit. http://www.microsoft.com/whdc/Devtools/wdk/ What IDE does one use? You'd best ask the guys in the C++ forum what they're using - last IDE that I used was Borland C++ Builder 5. That compiler is still freely available today, I believe. A big thanks goes to Eddy Vluggen.
-
Hello, I have a small situation. Not quite a developer yet, so i need a top-down view from someone with experience. I have a windows 7 box, and two mice connected to it, both using the windows default driver. As you can imagine they both work as a "mouse". What do i have to do, to "manage" the input of the second mouse to make it do something else, not just mousing around? Use it's movement to map to keys, and so on and so forth. Thank you in advance.
A pure guess this, but you might want take a look at the XNA/DirectX stuff. I'm just thinking that it has more capability of reconizing multiple input devices. tbh as the other replies have suggested the problem will be at the driver level, and the OS doesn't do/offer any distinction between connected 'mice'.