Jump to content

Mouse with extra mousebuttons, how to use those?


aRTee
 Share

Recommended Posts

I recently got the logitech 700mx wireless optical (nice mouse), with xev (from some xfree package) I can see that it recognises all buttons except the one on top (which is not placed practically anyway);

the extra scrollbuttons actually give the same signal as the mousewheel during scrolling, so no way to make that scroll more/faster than the wheel (which is supposedly the case under win; I don't know, haven't booted win in quite a while.. ;) )

 

But I'd actually like to be able to use the thumbbuttons for something,

for instance: to move windows with one, and push windows to back / bring to front with the other (without having to go to the window frame).

I don't know how to configure this;

I'm using

xmodmap -e "pointer= 1 2 3 6 7 4 5"

(to get the scrollwheel to work; could be slightly different, doing this from memory...), I tried to assign alt_l or so (since alt + mouse button lets you move or bring to front etc), but that doesn't work.

 

Anybody any idea? I'm using kde, so it would also be fine if you know a fix that only does the trick in kde.

Link to comment
Share on other sites

Counterspy,

the problem is not the driver, when I use xev it really sees button 7 and 8 clicked. The only one that is not recognised is the one on top, which is not handy anyway.

XFree 4.2 is capable of 8 buttons (found this info somewhere on the web), which would explain why the top button isn't seen. So the driver is fine.

 

I just want to know how to connect the buttons to certain keys or actions.

 

bvc,

Thanks for the link to that article; actually, I used very similar xmodmap commands to get the wheel to work...

The following quote is related to my problem/inconvenience:

 

And the whell button (MB) is assigned the number 6 (who knows, maybe some application will make use of it one day...)

 

So the buttons are seen, but not used. So how can I bind some other key or function to these extra buttons in kde?

I'd be happy if someone could tell me how to use xmodmap to map alt_l or so onto button 8 or so....

Link to comment
Share on other sites

I just found this: http://www.linuxquestions.org/questions/history/21303

 

which mentions the program imwheel (urpmi imwheel as root installed it for me from the 3rd cd), further it explains how to set things up;

 

My mouse sections in XFree config look like:

Section "InputDevice"

   Identifier "Mouse1"

   Driver "mouse"

   Option      "Protocol" "ExplorerPS/2"

   Option      "Device" "/dev/usbmouse"

   Option      "Buttons"  "8"

   Option      "ZAxisMapping" "7 8"

   Option      "Resolution" "10"

EndSection





Section "InputDevice"

   Identifier "Mouse2"

   Driver "mouse"

   Option "Protocol" "IMPS/2"

   Option "Device" "/dev/psaux"

   Option "ZAxisMapping" "4 5"

   Option      "Resolution" "1500"

EndSection

 

(Never mind the resolution thingy, I was playing and left it there; also yes, I have to mice now; there is one more line toward the end (in the serverlayout section):

InputDevice "Mouse2" "SendCoreEvents"

but anyway)

 

Im using the following xmodmap:

#!/bin/sh

xmodmap -e "pointer = 1 2 3 7 8 6 4 5"

(as a script in ~.kde/Autostart/)

and have just added:

#!/bin/sh

imwheel -k -b "87"

 

So my xmodmap and imwheel commands are slightly different..

 

And my .imwheelrc is the same:

".*"

None, Down, Alt_L|Left

None, Up, Alt_L|Right

 

So the first thumb button is forward in Opera, Konqueror etc, the second is back.. (alt+right arrow key and alt+ left arrow key).

 

 

<edit>

Slight addition, after repeatedly starting X and not getting the desired result,... I now have one file in the .kde/Autostart folder, with the following contents:

#!/bin/sh

killall /usr/bin/imwheel

xmodmap -e "pointer = 1 2 3 7 8 6 4 5"

imwheel -k -b "87"

because I found out that when kde started, a /usr/bin/imwheel -p got started, which then prevented proper functionality..

Anyway, now it works fine.

 

I still have the question of how to bind other functions to the thumbbuttons, like moving windows or putting them to the back...

Maybe kde has some way of doing that? (instead of using lmb+alt or mmb+alt.)

Link to comment
Share on other sites

  • 4 months later...
Guest Vermyndax

I know this is an old chat... but I've followed all of the directions here and actually have it responding to the side buttons, but it *always* gives a page up or page down command instead of what I put in my ~/.imwheelrc. I installed the imwheel 0.99 from the Mandrake 9.1 CDs... any ideas on this mess?

Link to comment
Share on other sites

Currently (since 9.1) I have the following .imwheelrc in my home dir:

 

[robert@zurich robert]$ cat .imwheelrc

".*"

None, Down, Alt_L|Left

None, Up, Alt_L|Right

 

and:

[robert@zurich robert]$ cat .kde/Autostart/muisxmodmap

#!/bin/sh

killall /usr/bin/imwheel

xmodmap -e "pointer = 1 2 3 7 6 4 5"

imwheel -k -b "67"

 

also, the relevant lines in my XF86Config are:

Section "InputDevice"

   Identifier "Mouse1"

   Driver "mouse"

   Option "Protocol" "ExplorerPS/2"

   Option "Device" "/dev/usbmouse"

   Option "ZAxisMapping" "6 7"

EndSection

 

Hope this helps!

Link to comment
Share on other sites

Guest Vermyndax

Turns out that Mozilla 1.3 has a bug that doesn't identify itself to imwheel. When using imwheel in debug mode, I see that it gets "(null)" as the name of the window. Hence it applies the default page-up and page-dn keys to the buttons I want to control.

 

To workaround this, I had to change my ~/.imwheelrc:

 

The first line of ".*" was changed to "(null)"

 

The rest of the file is the same. That fixed it for me.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...