tyme Posted January 11, 2003 Report Share Posted January 11, 2003 got a new mouse, tried to get the scroll working, screwed it up, not working :) what's the simplest mouse driver that i can load in XF86Config, and how do i shutdown and restart the mouse server? thanks :) Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted January 11, 2003 Report Share Posted January 11, 2003 How did you screw it up? What did you do? Quote Link to comment Share on other sites More sharing options...
tyme Posted January 11, 2003 Author Report Share Posted January 11, 2003 i changed the choice of what type of mouse it was in MCC, i forget what i choose...one under PS/2 w/a wheel Quote Link to comment Share on other sites More sharing options...
tyme Posted January 11, 2003 Author Report Share Posted January 11, 2003 fixed it...rebooted after clearing the name of the device out of XF86Config. i just wish i could get my freakin scroll to work Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted January 11, 2003 Report Share Posted January 11, 2003 Manually add it. Put this in your XF86Config-4 file Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/psaux" Option "ZAxisMapping" "4 5" Quote Link to comment Share on other sites More sharing options...
tyme Posted January 11, 2003 Author Report Share Posted January 11, 2003 thank you. works perfectly :) Quote Link to comment Share on other sites More sharing options...
Guest ndeb Posted January 11, 2003 Report Share Posted January 11, 2003 Good work, Ixthusdan. tyme, For mouses connected to the PS/2 port, X supports two main protocols: PS/2 and IMPS/2. An intellimouse (needs the IMPS/2 protocol) will misbehave if made to work with PS/2. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted January 13, 2003 Report Share Posted January 13, 2003 For yor wheel, this might help you: http://www.club-nihil.net/mub/viewtopic.ph...p?p=15884#15884 Yves. Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted January 13, 2003 Report Share Posted January 13, 2003 as the club-nihil is slated to go down on jan 18, here is the full quote of tYY's post 3 buttons + wheel (button). i want to use the 3rd button and not the wheel as the 3rd button. OK. So you want the thumb button to be number 3? yea The solution is in two steps: - step 1: configure properly your mouse, so that all your buttons are recognized, whatever the numbers assigned to them. - step 2: use the xmodmap command to reassign the buttons numbers. I think I can help you for both steps, but I have a Logitech optical USB MouseMan+ (code M-BD53) with wheel and thumb button (the one which is for right-handed persons only), and I don't know how much of my experience will apply to your mouse. I'll try to explain all along, so that you're able to adapt. Here's how I would do that: step 1 Login as root (or better: su - root, if you know what I mean). In /etc/X11/, there should be a XF86Config-4 file: that's XFree86 version 4 config file. In this file, there is a section named Section "InputDevice", with Identifier "Mouse1". In my case, here is the total section: Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "Device" "/dev/psaux" Option "Buttons" "8" Option "ZAxisMapping" "6 7" Option "Resolution" "400" EndSection I'll now comment it. Identifier and Driver can (must?) be left unchanged. Protocol and Device are totally unrelated: you can perfectly use the "PS/2" protocol (a good thing to begin) with an USB device. Normally, Device should be left unchanged if your mouse works (else is wouldn't work...). But if that's not the case (you're in "keyboard-only usage"), try putting the good device (usually /dev/usbmouse for USB or /dev/psaux for PS/2). Here I use the "ExplorerPS/2" protocol, which enables me to use all buttons (the "MouseManPlusPS/2" protocol does not allow the usage of the thumb button for me). First remove the ZAxisMapping line. Restart X. Open "xev" program (from X11 contribs package) from a command line: all events (mouse mouvements, mouse clicks, keys...) should be written to a small window. Note what button number is reported when you do one click up (wheel), one click down (wheel), and clicks with any button you have. Let those numbers be LB (left), MB (middle), RB (right), UB (up), DB (down), and TB (thumb). You can now put the Option "ZAxisMapping" line again. After "ZAxisMapping", put "UB DB", that is "6 7" in my case. You're done with this file: all your buttons should have a number, hence be recognized. step 2 Now you should know that all applications expect LB, MB, RB, UB, and DB to be 1, 2, 3, 4, and 5 in that order. But it is not the case for all protocols (eg. my mouse's protocol). So you have to tell X to adjust to your protocol. The way to do that is to execute a command similar to the following: xmodmap -display :0 -e "pointer = 1 2 3 8 7 4 5 6" >/dev/null 2>&1 This is the line for me. With this line, I tell that the 8 buttons of the protocols are to be rearranged: 1 becomes 1 (no change because LB was already 1) 2 becomes 2 (no change because MB was already 2) 3 becomes 3 (no change because RB was already 3) 4 becomes 8 (none of my mouse's buttons is numbered 4 in xev, so I replace 4 with a number unused by X: 8 ) 5 becomes 7 (none of my mouse's buttons is numbered 5 in xev, so I replace 5 with a number unused by X: 7) 6 becomes 4 (xev reports UB to be 6, but I need it to be 4, so that it can be used by X) 7 becomes 5 (xev reports DB to be 7, but I need it to be 5, so that it can be used by X) 8 becomes 6 (xev reports TB to be 8; X does not use button 6 but well... maybe it will be of some use one day). You have to adapt this command to your needs, and to the numbers xev reports. In your case, I understand you want the thumb button to replace the middle button (number 2), probably because it is easier to click on the thumb button than clicking on the wheel. In that case, using the numbers reported by xev for my mouse, I would have written (remember that TB is 8 for me): "pointer = 1 6 3 8 7 4 5 2" That way, button 8 becomes button 2. Cool, isn't it? And the whell button (MB) is assigned the number 6 (who knows, maybe some application will make use of it one day...) There remains to place this command in a file, so that it gets executed each time you login to your window manager, or better yet: each time you start X. I tried to find such a place (if possible independant of the window manager I use), and I did not find it. So I finally placed the command in /etc/profile. In Mandrake8.1, it works for all users except root (but then, I never login as root, I only su, so that's OK) but in other versions of Mandrake, or other distributions, you may have to place the command somewhere else. Note also that I executed the command with parameters -display :0 and with >/dev/null 2>&1. That's because I expect DISPLAY to be not set and errors to occur when I log in the console. If you find a better place for executing your command, where you're sure that it is executed only if X is running, then I strongly advise to replace -display :0 with -display $DISPLAY (if $DISPLAY is set of course, which it should); and please tell me about this better place Smile That's all. I hope this helps. Yves. ciao! Quote Link to comment Share on other sites More sharing options...
Guest kdsudac Posted January 27, 2003 Report Share Posted January 27, 2003 Ramfree, thanks for that post. I'm able to get it to work when I type the xmodmap pointer thing at the command terminal. However, I'm very new to linux and I'm not sure how to code it. Do you just write a file with those lines in it and put it in the /etc/profile directory? Do you need to save the file somewhere or reference it in another file? Or is everything that is in the /etc/profile folder automatically run everytime you log into x? Thanks Quote Link to comment Share on other sites More sharing options...
bvc Posted January 27, 2003 Report Share Posted January 27, 2003 /etc/profile =is a file /etc/profile.d =is a dir Put it in /etc/profile (the file) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.