Skip to content

boombatower/logitech-g710-linux-driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logitech G710+ Keyboard Driver

The Logitech G710+ mechanical keyboard is a great piece of hardware. Unfortunately, there is no support in the kernel for the additional features of the keyboard.

This kernel driver allows the keys M1-MR and G1-G6 to be used.

Instalation Instructions

First you have to compile the driver:

make

if the compilation was successfull, you will now have a new kernel module in the directory.

The next step is to install the kernel module:

sudo make install
sudo depmod -a

At this point the generic driver will still take control. The simple fix for that issue is to copy the 90-logitech-g710-plus.rules file from the misc folder to /etc/udev/rules.d/:

sudo cp misc/90-logitech-g710-plus.rules /etc/udev/rules.d/

Finally, if you do not receive any events in your environment, it might be necessary to use the modmap provided in the misc folder:

xmodmap misc/.Xmodmap

Usage

Use the key shortcut utilities provided by your DE to make use of the additional buttons.

Invoke the xmodmap to map the M1, M2, M3, and MR keys to modifier keys (ctrl, shift, etc). This can be done globally or in a bashrc file, etc. The driver will emit a press event for the active M* key when a G# key is pressed. For example:

  • M1 pressed
    • emit M1 down
    • emit M1 up
  • G1 pressed
    • emit M1 down
    • emit G1 down
    • emit G2 up
    • emit M1 up

The end result is it looks like each G# key is pressed together with a modifier. Eqivalent to ctrl+G1, etc. Key mapping applications should pick the combination which allows for the original G1-6 * 3 = 18 keys instead of just G1-6 + 3 = 9.

./xmodmap

End result should be similar to https://www.youtube.com/watch?v=uzDpQJYsC1E.

Example of utilizing exposed leds https://gist.github.com/boombatower/ccdab16926c919eee6b2.

API

The driver also exposes a way to set the keyboard backlight intensity. That is done by writing either:

/sys/bus/hid/devices/0003:046D:C24D.XXXX/logitech-g710/led_macro
/sys/bus/hid/devices/0003:046D:C24D.XXXX/logitech-g710/led_keys

where XXXX is varies (e.g. 0008)

The led_macro file expects a single number which is a bitmask of the first 4 bits. Each bit corresponds to a button. E.g. if you want to light up M1 and M3, you must write the bit pattern 0101, which corresponds to 5 in decimal:

echo -n "5" > /sys/bus/hid/devices/0003:046D:C24D.XXXX/logitech-g710/led_macro

Writing the led_keys is a bit more involved. The file expects a single digit which is constructed in the following way:

value= wasd << 4 | key

where: 
   wasd - WASD light intensity
   key - Other key light intensity

Only values from 0-4 accepted

About

Logitech G710 Linux Driver

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 98.7%
  • Other 1.3%