"be consistent" | |
PerlMonks |
Re: Capturing Raw Mouse Databy Ytrew (Pilgrim) |
on Feb 08, 2005 at 17:35 UTC ( [id://429149]=note: print w/replies, xml ) | Need Help?? |
I am looking for a way to capture and then parse raw mouse data. Before it goes through the driver and things of that nature.
You sound unhappy with your current mouse driver, because you're talking about capturing 'raw mouse data', and parsing it yourself: that is, you want to do the mouse driver's job for it. You haven't explained why you're unhappy with your mouse driver in the first place, though. Are you sure you really need to write your own? What is it that your existing mouse driver won't do? I don't know a lot about writing device drivers, but they're often considered rather difficult to write. Sometimes this is just because of a lack of detailed documentation on how the device hardware interfaces with the computer hardware. Sometimes it's because there's a lot of complexity in the interface. That said, mice are relatively simple, and have been around for a long time, so it might not be so hard in this case. Still, it's probably not worth it unless you have to. In any case, Perl is probably the wrong language for coding your driver code: if I really needed to write one, I'd write it mostly in C, and then use the Perl XS mechanism to call it from Perl. You can read more about perlxs in the perlxs and perlxstut sections of the man page. Beyond that, you could try reading up on how in general mice work (e.g. general protocols), how your mouse in specific works (e.g. implementation details for those protocols), how mice work under XP (how those protocols are interpreted by XP), and how they all interact together. If this all sounds like a lot of complexity to deal with just to talk to a silly little mouse, well, that's exactly why device drivers were created: to hide that complexity behind a standard interface.
Good luck! Sorry I couldn't be more helpful: perhaps if you post the exact problem you're trying to solve we could give a better answer.
In Section
Seekers of Perl Wisdom
|
|