DragonFly BSD
DragonFly submit List (threaded) for 2006-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Make ums(4) present the mouse as a sysmouse type device by default


From: Laurent Sartran <lsartran@xxxxxxxxxx>
Date: Fri, 17 Feb 2006 19:00:07 +0100

On Fri, Feb 17, 2006 at 10:19:24AM +0100, Simon 'corecode' Schubert wrote:
> are you sure that you are using the latest Xorg version from pkgsrc? There 
> recently was a fix concerning moused.

Well actually, I've just upgraded to the very latest version of xorg-server, 
6.9.0nb5 (I was using 6.9.0nb3), and the problem have disappeared... I'm 
sincerely sorry for making Matt and you lose your time with this.

I did read Joerg's message of Feb 1st about a "sysmouse issue" fixed in the 
current package set, which I was using, but since I still experienced a problem,
I thought this issue was unrelated... Next time, I'll check the version more
carefully.

> >:I'm a little bit lost with all that: I can't get moused to work correctly 
> with :my mouse, and I have to modify ums(4) to use the right mode by default.
> >:I guess I'll try to write a little oneliner to set it using ioctl(), which 
> will
> >:be loaded at startup...
> 
> moused works perfectly with my 3 button/wheel usb mouse here.  what does
> 
> 	moused -d -f -p /dev/ums0
> 
> output?

The output was always perfectly correct, but the mouse behavior under X.org
wasn't until the upgrade...

moused: received char 0x87
moused: received char 0x0
moused: received char 0x0
moused: received char 0x0
moused: received char 0x0
moused: received char 0x0
moused: received char 0x0
moused: received char 0x7f
moused: assembled full packet (len 8) 87,0,0,0,0,0,0,7f
moused: tv:  1140198616 381342
moused: flags:00000010 buttons:00000000 obuttons:00000010
moused: activity : buttons 0x00000000  dx 0  dy 0  dz 0
moused: mstate[4]->count:1
moused: button 5  count 0

Just in case someone is bugged by moused for some reason, here is the little
piece of code I was using to make full use of my mouse.

8<-------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <machine/mouse.h>

void fail(char *s)
{
        printf("%s\n",s);
        exit(-1);
}

int main()
{
        int fd, level;
        if ((fd = open("/dev/ums0", O_RDONLY))==-1)
                fail("unable to open mouse device");
        if (ioctl(fd, MOUSE_GETLEVEL, &level)==-1)
                fail("unable to get mouse device level");
        level = level ? 0 : 1;
        if (ioctl(fd, MOUSE_SETLEVEL, &level)==-1)
                fail("unable to set mouse device level");
        printf("mouse device level set to: %d\n",level);
        close(fd);
        return 0;
}
-------------------------------------------------------------------------8<

Regards,

Laurent Sartran




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