Logitech

From openSUSE

(Redirected from Logitech-MX400)
This article is a stub!

This article needs to be expanded. If you can help please do so in line with the openSUSE Style Guide.
If you are looking for something to do, see the other articles that need expanding

Contents


Mouse

Logitech MX 400

Enabling side scrolling and additional buttons of your USB mouse, e.g. Logitech MX400 Image:Mx400.png

Purpose

This article is based on a Logitech MX400 USB connected mouse and explains how to use the side scrolling feature and the two additional side buttons. See "Troubleshooting" for some hints, if you have a different mouse and what you might have to consider. This How-To is based on openSUSE 10.3(=Xorg 7.2), older versions of Xorg may need different settings in xorg.conf.

Configuring Xorg

I) Identifying your mouse

When your mouse is connected to the USB there will be a /proc entry that identifies it. This way you can later plug the mouse into any other USB port without the need to change your xorg.conf. The mouse will be automagically found by its name. Open a console program, e.g. "konsole" under KDE and do the following:

cd /proc/bus/input :there you will find devices connected to your PC, e.g. via USB

less devices :when you now view at the contents of this file you will find your mouse

What you will find in "devices" will look like this in the case of a Logitech:

Logitech USB-PS/2 Optical Mouse

Write it down we will need it later.

II) Telling Xorg about your mouse

Open /etc/X11/xorg.conf with your favourite text editor. Edit the section "InputDevice" to make it look like this:

Section "InputDevice"
  Driver       "evdev"
  Identifier   "Mouse[1]"
  Option       "Buttons" "9"
  Option       "Name" "Logitech USB-PS/2 Optical Mouse"
  Option       "ButtonMapping" "1 2 3 6 7 8 9"
  Option       "ZAxisMapping" "4 5 6 7"
EndSection

As you can see the name of the mouse we gathered from /proc/bus/input/devices is now written in this section. Note: the values of ButtonMapping and ZAxisMapping may be different for a different brand or mouse model!

Configuring imwheel

I) Installing imwheel

The program imwheel can be used to activate and configure additional buttons and side scrolling. Since it is not part of openSUSE you need to install it first. Get it from its homepage at http://imwheel.sourceforge.net and install it after downloading as usual, after extracting it: configure && make && make install

II) Configuring imwheel

In your home directory create a file named .imwheelrc and fill it exactly with the following content, we want to use side scrolling and side buttons with Firefox:

"^Firefox-bin$"
None, Thumb1, Alt_L|Left
None, Thumb2, Alt_L|Right

III) Automatically start imwheel

Now make sure imwheel gets startet every time you log on to your KDE session. Create a file named imwheel.sh in $HOME/.kde/Autostart with the following content and do not forget to invoke chmod +x imwheel.sh to make it executable!

$HOME/.kde/Autostart/imwheel.sh should now look like this:

#!/bin/sh
imwheel -b "007689"

If you do not use KDE, please learn how to automatically execute the above script imwheel.sh when you log on.

Now, the basic configuration is completed for the MX400, you could continue now configuring Firefox.

Preparing Firefox for side scrolling

Necessary values

Start Firefox, type about:config in the address field and look if you can find the following integer values:

mousewheel.horizscroll.withnokey.action should be 0

mousewheel.horizscroll.withnokey.numlines should be 2

If you cannot find these values, you may need to create them, they have the type integer. After typing about:config just right click into the window and create them.

Finally, testing it

When you use a MX400 all the above values should work and when you now start Firefox you can use the side buttons to go back and forth within the browsers history and when you watch e.g. a large picture with your browser you should be able to use side scrolling with the wheel button!

Troubleshooting

I do not have a Logitech MX400

You need to find out some values you put into /etc/X11/xorg.conf that may differ from the values above. When you start X look at /var/log/Xorg.0.log how many mouse buttons were found. Use Google, maybe someone else already found the right values for your specific brand or model.

Configuring imwheel

The package comes with a manual page and the sources also contain a useful README file, look at it. Play with the start parameters of imwheel, so you could add -D in order to get more output.

Check, is imwheel really running: ps aux | grep imwheel

Instead of using imwheel -b "007689" as mentioned above, try to change the numbers to 006789 instead.

Note: in order to make imwheel changes effect, you need to kill a running imwheel process!

So, before invoking a new imwheel command with different parameters, check with ps aux | grep imwheel if it is already running an do a killall imwheel and then run it again.

When you need to do testing, you might use the -d option so imwheel can easily be killed with CTRL-C for example:

imwheel -d -b "007689"

This way it stays in the foreground and if you are not satisfied, you press CTRL-C to kill it and start it with different values again. Once your values are ok, you don't need the -d option.

Logitech MX 1000

Configuring X.org

Xorg.conf

Section "InputDevice"
 Driver "mouse"
 Identifier "Mouse[1]"
 Option "ButtonNumber" "12"
 Option "Buttons" "12"
 Option "Device" "/dev/input/mice"
 Option "Name" "Logitech MX1000 USB PS/2 Mouse"
 Option "Protocol" "ExplorerPS/2"
 Option "Vendor" "Sysp"
 Option "Resolution" "800"
 Option "ZAxisMapping" "11 12"
EndSection

Configuring Xmodmap

.Xmodmap

pointer = 1 2 3 6 7 8 9 10 11 12 4 5

Logitech MX Revolution

Configuring X.org

Xorg.conf

Section "InputDevice"
 Identifier   "Mouse[1]"
 Driver       "evdev"
 Option       "Phys" "usb-*2.2/input0"   # cat /proc/bus/input/devices
 Option       "CorePointer"
 Option       "ZAxisMapping"        "4 5"
EndSection

Logitech Information

Configuring Xmodmap

.Xmodmap

pointer = 1 17 3 4 5 8 9 6 7 10 11 12 13 14 15 16 2 18 19 20

Logitech G5, G7 Laser Gaming Mouse

This config was set to work with the 2-side button edition (G5 2007), but should work with either the G5 one-side button and the wireless G7 version.

Configuring X.org

Xorg.conf

Section "InputDevice"
  Driver         "evdev"
  Identifier     "Mouse[1]"                             
  Option         "Buttons" "12"
  Option         "Name" "Logitech USB Gaming Mouse"
  Option         "Vendor" "Sysp"
  Option         "ZAxisMapping" "4 5 6 7"
  # Driver         "mouse"
  # Option         "Device" "/dev/input/mice"
  # Option         "Protocol" "explorerps/2"
EndSection

Configuring Xmodmap

.Xmodmap

pointer = 1 2 3 4 5 9 8 6 7 10 11 12 13 14 15 16 17 18 19 20

Binding keyboard to mouse buttons

Here is how to bind some mouse buttons to keyboard ones, like some keyboard shorcuts of Konqueror.

Install xbindkeys, then generate a default config

xbindkeys --defaults >> ~/.xbindkeysrc
xbindkeys

Bind the "back" and "forward" buttons of Konqueror, and same for "up" and "home". You can check your mouse buttons number using xev.

"xvkbd  -text "\[Alt]\[Left]""
      m:0x0 + b:6
"xvkbd  -text "\[Alt]\[Right]""
      m:0x0 + b:7
"xvkbd  -text "\[Alt]\[Up]""
      m:0x0 + b:9
"xvkbd  -text "\[Control]\[Home]""
      m:0x0 + b:8

Restart xbindkeys

pkill -f xbindkeys
xbindkeys 

See also

Logitech information Get All Mouse Buttons Working, ArchLinux Wiki HOW-TO Advanced Mouse Configuration, Gentoo Wiki

Keyboard