George Gallen on 2 Feb 2005 19:41:08 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] perl and mouses (a how do you do that ?)


ok. here is a question for the perl xperts here...

I need to write a routine that scans the mouse, and writes to a file when either
  the right or left mouse button is clicked, it needs to log, which button and the epoc.
  that is all it's function will be. Looping waiting, logging.

The logging is no problem, getting the epoc is no problem.

I just don't know how to scan the mouse button? Which modules, what device, how
  would I determine the button clicks?

Ultimately, I'm writing a second program that will run and it's actions will be determined
   by the mouse clicks, but not in real-time, that's why they need to be logged.

The reason I chose the mouse, is I need a way to wire a momentary switch to the PC,
   so, I'm going to hack a mouse, and put this switch in series with the mouse, doing
   it this way gives me the benefit of having 2 switches for expansion of the project, and
   already having the wiring, drivers done to read the switches, and the switches can be
   hooked up USB.

Speaking of USB, what happens when two mice are hooked up to a USB, do both work?
   or can I read from each one? hmmm.

George

George Gallen
Senior Programmer/Analyst
Accounting/Data Division
ggallen@slackinc.com
ph:856.848.1000 Ext 220

SLACK Incorporated - An innovative information, education and management company
http://www.slackinc.com

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug