Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Capturing Raw Mouse Data

by Ytrew (Pilgrim)
on Feb 08, 2005 at 17:35 UTC ( [id://429149]=note: print w/replies, xml ) Need Help??


in reply to Capturing Raw Mouse Data

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.
--
Ytrew

Replies are listed 'Best First'.
Re^2: Capturing Raw Mouse Data
by bkiahg (Pilgrim) on Feb 09, 2005 at 03:08 UTC
    I really appreciate your input. The reason I am looking for this solution is that I am building my own switch and am trying to find ways to talk to the mouse. So technically there won't even be an operating system, or a simple one. I could possible use existing drivers, but very new to that concept. Just was fishing for ideas. Thanks again!
      So, if there isn't an operating system, or just a simple one, how are you going to run perl?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://429149]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-29 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found