Date: Sat, 28 Apr 2001 11:20:55 -0500 From: Andrew Hesford <ajh3@chmod.ath.cx> To: Dave Leimbach <dleimbac@earthlink.net> Cc: questions@freebsd.org Subject: Re: Logitech USB mouse with scroll wheel. Message-ID: <20010428112055.A3363@cec.wustl.edu> In-Reply-To: <200104281432.HAA17002@hawk.mail.pas.earthlink.net>; from dleimbac@earthlink.net on Sat, Apr 28, 2001 at 09:34:13AM -0500 References: <200104281432.HAA17002@hawk.mail.pas.earthlink.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 28, 2001 at 09:34:13AM -0500, Dave Leimbach wrote: > FreeBSD Release 4.2: > > My mouse is the slightly more expensive logitech USB scroll wheel mouse > with the "thumb button" > > I have been working on this for over a week. I use moused for when I am > not in X and since my mouse is USB the man page says I must choose "auto" > for my protocol for it to work. > > Then for X windows I have my device set to be /dev/sysmouse which forces me > to use the MouseSystems protocol. <The only one that works... I tried > others.> > > I have added <for XFree86 4.0.2> > Options "ZaxisMapping" "4 5" > > How can I get the scroll wheel to work in X if this isn't working? You're in luck... I just bought a Logitech cordless keyboard/mouse set, and had to get the USB mouse working. You should note that even Logitech suggests using the PS/2 adapter if you can. In the end, I wound up using the adapter--getting the USB feature working was just for experimentation. The only thing a USB mouse is good for, is if you want to use a PS/2 mouse and a USB mouse together. That said, if you still insist on USB, here goes: The thumb button makes an awesome middle button. Using the scroll wheel as a middle button is no good, because you often move the roller when trying to press it down. Plus, it is more awkward to push down than the thumb button. Here's what I did to preserve the thumb button as button two. Do you really need a console mouse? I don't like moused very much, so I leave it disabled and use direct XFree86 mouse support. If you want to use direct XFree86 mouse supports, you make your mouse section look like this: Section "InputDevice" Identifier "USB Mouse" # Rename as desired. Driver "mouse" Option "CorePointer" Option "Protocol" "Auto" Option "Device" "/dev/ums0" Option "ZAxisMapping" "5 6" EndSection If you really want moused running, make sure you have started it with `moused -t auto -p /dev/ums0`. I think usbd should handle this for you, unless you've changed the configuration. In that case, the InputDevice section is the same as above except you change the "Device" and "Protocol" options to read Option "Device" "/dev/sysmouse" Option "Protocol" "SysMouse" This will set up the left and right buttons as buttons 1 and 3, respectively, the thumb as button four, wheel up as 5, wheel down as 6, and wheel depressed as 3. This is absolutely horrible. Hence you use xmodmap to reassign the buttons into something workable. I don't know what your .xinitrc or .xsession looks like, but mine has a nice section that looks for a .Xmodmap file and loads it if present. Therefore, to make things easy on myself, I created a .Xmodmap. Otherwise, you can create a file with any arbitrary name (ideally a hidden file, so you don't have it coming up in standard directory listings). Let's assume you call it .Xmodmap like me. Add the following line to the file: pointer = 1 6 3 2 4 5 Then, if .xinitrc doesn't automatically load it, add the following line to your .xinitrc (or .xsession): xmodmap .Xmodmap Naturally, if .xinitrc isn't in the same directory as .Xmodmap, you may need a path to the file. When you start X, the left and right buttons will still be 1 and 3, the thumb button will be 2 (the middle button), wheel up will be 4, wheel down will be 5, and wheel depressed will be 6. If you open up xev and look at its output, you will be able to confirm this by pressing buttons in the xev window. Next, to test the wheel, open an xterm. Do a bunch of stuff so it has a history to scroll through, then wheel around and notice how the xterm scrolls. I think this also works for GTK and Qt apps. Note that wheel support is up to the application, which means if it isn't a GTK or Qt app, or isn't an xterm, it won't appear to work. You need to create an X resources file, which you can learn about at http://www-sop.inria.fr/koala/colas/mouse-wheel-scroll. The site is pretty good, although in some parts the English can be lousy... oh well. After having said all this, I'll bet you your wheel worked all along, but you tried it on an app that wasn't configured for the wheel... am I right? -- Andrew Hesford ajh3@chmod.ath.cx To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010428112055.A3363>