Sending mouse button clicks to PS2 Mouse

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Nitro
Posts: 12
Joined: Thu May 08, 2008 12:42 pm

Post by Nitro »

I used a dll Inpout32.dll wich exports the in/out functions that allow me to read and write from any port, under a NT based system.

Yes by win32 i mean functions like mouse_event,keyb_event, sendinput or sendmessage.
All of them allow to simulate mouse/keyb events, BUT all of them can be hooked, so they are useless considering my purposes..
User avatar
CmpXchg
Member
Member
Posts: 61
Joined: Mon Apr 28, 2008 12:14 pm
Location: Petrozavodsk, Russia during school months, Vänersborg Sweden in the summertime

Post by CmpXchg »

OK, now I see...
Nitro wrote:I used a dll Inpout32.dll wich exports the in/out functions that allow me to read and write from any port, under a NT based system.
Wonderful! Now I see why we can't use interrupts. (I wonder how this DLL works, by the way. Probably Inpout32.dll requires some driver, which needs to be installed in the system. But that's not important now.)

Well, then you have to implement your sequence:
-wait until buffer is empty
-lock mouse
-write packet sequence for clicking/moving.
-unlock mouse

Many problems might rise, you'll have to use trial and error approach. What if after mouse is locked, writing a packet sequence will have no effect? Maybe we don't need locking at all then.

As you say, you got it working for keyboard, so mouse shouldn't be very difficult 8)
tian008
Posts: 1
Joined: Mon Oct 13, 2008 4:25 pm

Re: Sending mouse button clicks to PS2 Mouse

Post by tian008 »

Nitro, this topic is a few months old, so just wondering if you are still working on sending mouse button clicks to PS2 Mouse? If so, I'm working on the same thing... so give me a pm and we can exchange notes :)
Post Reply