Difference between revisions of "Logitech G300"

From ArchWiki
Jump to: navigation, search
m (added a way to customize the mouse)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Mice]]
 
[[Category:Mice]]
== How to Make G300 Work Correctly ==
+
== G300s community drivers ==
  
This Wiki page will show you how to get your G00 mouse working as desired.
+
Install {{AUR|ratslap}} for drivers for the mouse. It can change colors, binding, and even create custom macros.
 +
After installation, use the ratslap binary to change the mouse.
 +
 
 +
== How to make G300 work correctly ==
 +
 
 +
This Wiki page will show you how to get your G300 mouse working as desired.
  
 
G300 is recognized as both mouse and keyboard by system, you could check by execute:
 
G300 is recognized as both mouse and keyboard by system, you could check by execute:
Line 11: Line 16:
 
Here's the code:
 
Here's the code:
 
  #!/bin/sh
 
  #!/bin/sh
  DEVICE_ID=`xinput list |  grep "Logitech Gaming Mouse G300" | grep keyboard | sed 's/.*id=\([0-9]*\).*/\1/'`
+
  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
 
  if xinput -list-props $DEVICE_ID | grep "Device Enabled" | grep "1$" > /dev/null
 
  then
 
  then
    xinput set-int-prop $DEVICE_ID "Device Enabled" 8 0
+
        xinput set-int-prop $DEVICE_ID "Device Enabled" 8 0
 
  fi
 
  fi
  
Line 21: Line 26:
  
 
And you could put it into your xinitrc.d to make it load automatically.
 
And you could put it into your xinitrc.d to make it load automatically.
 +
 +
 +
== Configuring the buttons ==
 +
 +
The above script works as intended but it also disables the buttons, since we disabled the keyboard function of the g300.
 +
 +
To make this mouse working as a mouse and being able to use the buttons, we can use [https://aur.archlinux.org/packages/?O=0&K=ratslap ratslap] from aur for customizations (colors and buttons).

Latest revision as of 03:23, 21 June 2017

G300s community drivers

Install ratslapAUR for drivers for the mouse. It can change colors, binding, and even create custom macros. After installation, use the ratslap binary to change the mouse.

How to make G300 work correctly

This Wiki page will show you how to get your G300 mouse working as desired.

G300 is recognized as both mouse and keyboard by system, you could check by execute:

xinput list | grep G300

We have to disable the G300 keyboard to make it work correctly.

Here's the 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

Simply execute the code above to see if it's working.

And you could put it into your xinitrc.d to make it load automatically.


Configuring the buttons

The above script works as intended but it also disables the buttons, since we disabled the keyboard function of the g300.

To make this mouse working as a mouse and being able to use the buttons, we can use ratslap from aur for customizations (colors and buttons).