Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

logitech_g300_linux [2012/01/10 11:16]
terminar
logitech_g300_linux [2012/08/16 13:10] (aktuell)
terminar
Zeile 1: Zeile 1:
 +
 +
 +====== Logitech G300 fixes ======
 +
 +===== Logitech G300 mouse jump fix =====
 +
 +The Logitech G300 mouse is not working on linux systems out of the box correctly. It jumps to the top left corner when the mouse is pressed.
 +
 +I've found two solutions on different websites. You can find the sources below. I merged both ideas which works great in the .bash_profile.
 +
 +<code>
 +#!/bin/sh
 +DEVICE_ID=`xinput list |  grep "Logitech Gaming Mouse G300" | grep keyboard | sed 's/.*id=\([0-9]*\).*/\1/'`
 +
 +if xinput -list-props $DEVICE_ID | grep "Device Enabled" | grep "1$" > /dev/null
 +then
 +   xinput set-mode $DEVICE_ID RELATIVE
 +fi
 +</code>
 +
 +
 +==== ArchLinux Tipp: disable the keyboard part of the mouse ====
 +
 +Source: https://wiki.archlinux.org/index.php/Logitech_G300
 +
 +G300 is recognized as both mouse and keyboard by system, you could check by execute:
 +<code>
 +xinput list | grep G300
 +</code>
 +We have to disable the G300 keyboard to make it work correctly.
 +
 +Here's the code:
 +<code>
 +#!/bin/sh
 +DEVICE_ID=`xinput list |  grep "Logitech Gaming Mouse G300" | grep keyboard | sed 's/.*id=\([0-9]*\).*/\1/'`
 +
 +if xinput -list-props $DEVICE_ID | grep "Device Enabled" | grep "1$" > /dev/null
 +then
 +   xinput set-int-prop $DEVICE_ID "Device Enabled" 8 0
 +fi
 +</code>
 +Simply execute the code above to see if it's working.
 +
 +And you could put it into your xinitrc.d (or .bash_profile) to make it load automatically. 
 +
 +==== Answers on http://vniup.com/index.php/ubuntu/logitech-g300-not-working-on-ubuntu.html ====
 +
 +8 January 2012: Answer by drel for Logitech G300, not working on Ubuntu -
 +
 +I have found a more convenient workaround for the issue and maybe why it works fine on Fedora. I have just set the mode of the keyboard part of the mouse to relative. In my case:
 +
 +<code>
 +xinput set-mode 12 RELATIVE
 +</code>
 +
 +Where 12 is the ID of the g300 keyboard. Now that I have done that my mouse recognizes the keys the way I mapped them with the Logitech software under Windows.
 +
 +Hope that helps you, guys get a better use of the mouse.
 +
 +Cheers.
 +18 November 2011: Answer by Tomas for Logitech G300, not working on Ubuntu -
 +
 +Okay, I digged some further into the issue. I already suspected the programmability of the G300 might have something to do with it. And when you enter
 +
 +xinput list, it shows the G300 as both a mouse and a keyboard. In my case the G300 keyboard entry has id 12.
 +
 +xinput list-props 12 gives all properties of the G300 keyboard. It includes this line:
 +<code>
 +    Device Enabled (146): 1
 +</code>
 +which means that if we set the property with id 146 to a value of 0 for device id 12, the G300 keyboard is disabled.
 +
 +Using
 +<code>
 +xinput set-prop 12 146 0
 +</code>
 +
 +===== Map mouse buttons for left hand use - xfce (X11) =====
 +<code>
 +DEVICE_ID=`xinput list |  grep "Logitech Gaming Mouse G300" | grep pointer | sed 's/.*id=\([0-9]*\).*/\1/'`
 +if xinput -list-props $DEVICE_ID | grep "Device Enabled" | grep "1$" > /dev/null
 +then
 +    xinput set-mode $DEVICE_ID RELATIVE
 +    xinput set-button-map $DEVICE_ID 3 2 1 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 +fi
 +</code>
 +
 +another one from http://crunchbanglinux.org/forums/topic/1760/easy-way-to-invert-leftright-mouse-buttons/:
 +<code>
 +# left-handed mouse (or the name you want).
 +xmodmap -e "pointer = 3 2 1"
 +</code>
 +or 
 +<code>
 +#!/bin/bash
 +
 +current=$(xmodmap -pp | head -5 | tail -1 | awk '{print $2}');
 +
 +if [ "$current" -eq "1" ]
 +then 
 +        xmodmap -e "pointer = 3 2 1";
 +else
 +        xmodmap -e "pointer = 1 2 3";
 +fi
 +</code>
  
 
 
         
         
   
(27032 views) logitech_g300_linux.txt · Zuletzt geändert: 2012/08/16 13:10 von terminar