Subject: Re: how to use mouse api if any
To: Rishabh Kumar Goel <Rishabh@soc-soft.com>
From: Lennart Augustsson <lennart@augustsson.net>
List: port-i386
Date: 07/10/2003 10:44:17
% man wsmouse
...
FILES
     /dev/wsmouse*

     /usr/include/dev/wscons/wsconsio.h.

% cat /usr/include/dev/wscons/wsconsio.h
...
/*
 * Common event structure (used by keyboard and mouse)
 */
struct wscons_event {
        u_int           type;
        int             value;
        struct timespec time;
};


What's wrong with that?

    -- Lennart


Rishabh Kumar Goel wrote:

>hi Richard,
>
>well u got my problem, but i don't want to use X api's, for mouse. 
>basically, what i am doing is simply........
>
>1. Detecting the mouse clicks in text mode and then send it accross to my       windows program for display.
>2. Detecting the keyboard hits in text mode and then send it accross to my       windows program for display.
>
>For mouse i cannot find any such api. I m not bothered even if mouse don't work on X, but have to get the events detected in text wmode without the use of api's provided by X.
>
>Regards
>Rishabh
>
>-----Original Message-----
>From:	Richard Rauch [mailto:rkr@olib.org]
>Sent:	Thu 7/10/2003 12:11 AM
>To:	Rishabh Kumar Goel; port-i386@netbsd.org
>Cc:	
>Subject:	Re: how to use mouse api if any
>Re. http://mail-index.netbsd.org/port-i386/2003/07/09/0000.html
>
>(This question isn't really i386-specific and probably should have been
>asked over on netbsd-help...)
>
>Reading /dev/wsmouse for /dev/wsmouse0 is probably what you want to do,
>yes.  (Assuming that you mean that you want to read mouse events from a
>text console.)
>
>My suspicion is that you mean that when you did "cat /dev/wsmouse0" from
>a text console, then flipped to the X sever (while "cat" was still
>running), the X server wasn't able to re-open the mouse event stream.
>All that this is telling *me* is that you can't have multiple readers of
>the mouse.
>
>
>If you want to get the mouse events from X, then you should probably be
>talking to X rather than digging under X's feet.
>
>
>  
>