mirror of
https://github.com/MatMoul/g810-led.git
synced 2025-04-09 17:13:02 +00:00
updated documentation
This commit is contained in:
parent
bd2023e93e
commit
71070b9db5
@ -1,4 +1,4 @@
|
||||
# g810-led - CONTRIBUTORS (alpha order) :</br>
|
||||
# g810-led - CONTRIBUTORS (alpha order):
|
||||
|
||||
## [andreast1990](https://github.com/andreast1990) :
|
||||
* Add Wireshark dump for g910
|
||||
@ -25,6 +25,9 @@
|
||||
## [jdagerbo](https://github.com/jdagerbo) :
|
||||
* Refactor many of the code (very hard work)
|
||||
|
||||
## [konserw](https://github.com/konserw) :
|
||||
* CMake cupport
|
||||
|
||||
## [Landrovan](https://github.com/Landrovan) :
|
||||
* Improve support of G410 (two times)
|
||||
|
||||
|
34
INSTALL.md
34
INSTALL.md
@ -1,28 +1,28 @@
|
||||
# Installation :</br>
|
||||
# Installation:
|
||||
|
||||
## Build dependencies :</br>
|
||||
## Build dependencies:
|
||||
* git
|
||||
* g++
|
||||
* make
|
||||
|
||||
## Dependencies :</br>
|
||||
## Dependencies:>
|
||||
* hidapi or libusb
|
||||
|
||||
## hidapi vs libusb :</br>
|
||||
## hidapi vs libusb:
|
||||
hidapi is a newer implementation but needs more testing.</br>
|
||||
hidapi is more responsive than libusb (~20ms vs ~150ms).</br>
|
||||
hidapi seem not work on CentOS, writing on hidraw is not allowed.</br>
|
||||
hidapi is recommended but if you encounter problem on your system, switch to libusb.</br>
|
||||
|
||||
|
||||
## Installation by repos :</br>
|
||||
ArchLinux (aur) :</br>
|
||||
## Installation by repos:
|
||||
ArchLinux (aur):</br>
|
||||
`yaourt -S g810-led-git` # with yaourt</br>
|
||||
`pacaur -S g810-led-git` # with pacaur</br>
|
||||
|
||||
|
||||
## Installation of dependencies :</br>
|
||||
ArchLinux :</br>
|
||||
## Installation of dependencies:
|
||||
ArchLinux:</br>
|
||||
`sudo pacman -S git gcc make hidapi` # for hidapi</br>
|
||||
`sudo pacman -S git gcc make libusb` # for libusb</br>
|
||||
Debian :</br>
|
||||
@ -32,26 +32,34 @@ Fedora :</br>
|
||||
`sudo dnf install git make gcc-c++ hidapi-devel` # for hidapi</br>
|
||||
`sudo dnf install git make gcc-c++ libusbx-devel` # for libusb</br>
|
||||
|
||||
## Installation :</br>
|
||||
## Installation:
|
||||
`git clone https://github.com/MatMoul/g810-led.git`</br>
|
||||
`cd g810-led`</br>
|
||||
### Makefile variant:
|
||||
`make bin` # for hidapi</br>
|
||||
`make bin LIB=libusb` # for libusb</br>
|
||||
`sudo make install`</br>
|
||||
### CMake variant:
|
||||
`cmake -E make_directory build
|
||||
`cmake -E chdir build cmake ..`
|
||||
`cmake --build build`
|
||||
TODO: CMake variant for installation
|
||||
|
||||
## Installation of the library (For developpers) :</br>
|
||||
## Installation of the library (For developpers):
|
||||
`make lib` # for hidapi</br>
|
||||
`make lib LIB=libusb` # for libusb</br>
|
||||
`sudo make install-lib` to install the libg810-led library.</br>
|
||||
`sudo make install-dev` to install the libg810-led library and headers for development.</br>
|
||||
TODO: CMake variant for this
|
||||
|
||||
## Update :</br>
|
||||
## Update:
|
||||
Same as install, but your profile and reboot files are preserved.</br>
|
||||
|
||||
## Uninstall :</br>
|
||||
## Uninstall:
|
||||
`sudo make uninstall`</br>
|
||||
TODO: CMake variant for this
|
||||
|
||||
## Boot profiles :</br>
|
||||
## Boot profiles:
|
||||
On boot, the keyboard is set with the udev file /etc/udev/rules.d/g810-led.rules</br>
|
||||
This file launch the profile stored in /etc/g810-led/profile</br>
|
||||
To prevent your keyboard to flash 3 time when you reboot, a systemd unit (g810-led-reboot) is available for this.</br>
|
||||
|
74
README.md
74
README.md
@ -20,51 +20,45 @@ Linux led controller for Logitech G213, G410, G610, G810, G910 and GPRO Keyboard
|
||||
* [INSTALL.md](https://github.com/MatMoul/g810-led/blob/master/INSTALL.md)
|
||||
|
||||
## Help :</br>
|
||||
`g213-led --help`</br>
|
||||
`g410-led --help`</br>
|
||||
`g610-led --help`</br>
|
||||
`g810-led --help`</br>
|
||||
`g910-led --help`</br>
|
||||
`gpro-led --help`</br>
|
||||
|
||||
`g810-led --help-keys`</br>
|
||||
`g810-led --help-effects`</br>
|
||||
`g810-led --help-samples`</br>
|
||||
`ledkeyboard --help`</br>
|
||||
`ledkeyboard --help-keys`</br>
|
||||
`ledkeyboard --help-effects`</br>
|
||||
`ledkeyboard --help-samples`</br>
|
||||
|
||||
## Samples :</br>
|
||||
`g810-led -p /etc/g810/profile # Load a profile`</br>
|
||||
`g810-led -k logo ff0000 # Set color of a key`</br>
|
||||
`g810-led -a 00ff00 # Set color of all keys`</br>
|
||||
`g810-led -g fkeys ff00ff # Set color of a group of keys`</br>
|
||||
`g810-led -s color # Set keyboard power on effect`</br>
|
||||
`g810-led -fx color keys 00ff00 # Set fixed color effect`</br>
|
||||
`g810-led -fx breathing logo 00ff00 0a # Set breathing effect`</br>
|
||||
`g810-led -fx cycle all 0a # Set color cycle effect`</br>
|
||||
`g810-led -fx hwave keys 0a # Set horizontal wave effect`</br>
|
||||
`g810-led -fx vwave keys 0a # Set vertical wave effect`</br>
|
||||
`g810-led -fx cwave keys 0a # Set center wave effect`</br>
|
||||
`ledkeyboard -p /etc/g810/profile # Load a profile`</br>
|
||||
`ledkeyboard -k logo ff0000 # Set color of a key`</br>
|
||||
`ledkeyboard -a 00ff00 # Set color of all keys`</br>
|
||||
`ledkeyboard -g fkeys ff00ff # Set color of a group of keys`</br>
|
||||
`ledkeyboard -s color # Set keyboard power on effect`</br>
|
||||
`ledkeyboard -fx color keys 00ff00 # Set fixed color effect`</br>
|
||||
`ledkeyboard -fx breathing logo 00ff00 0a # Set breathing effect`</br>
|
||||
`ledkeyboard -fx cycle all 0a # Set color cycle effect`</br>
|
||||
`ledkeyboard -fx hwave keys 0a # Set horizontal wave effect`</br>
|
||||
`ledkeyboard -fx vwave keys 0a # Set vertical wave effect`</br>
|
||||
`ledkeyboard -fx cwave keys 0a # Set center wave effect`</br>
|
||||
|
||||
## Samples with no commit :</br>
|
||||
`g810-led -an 000000 # Set color of all key with no action`</br>
|
||||
`g810-led -gn modifiers ff0000 # Set color of a group with no action`</br>
|
||||
`g810-led -kn w ff0000 # Set color of a key with no action`</br>
|
||||
`g810-led -kn a ff0000 # Set color of a key with no action`</br>
|
||||
`g810-led -kn s ff0000 # Set color of a key with no action`</br>
|
||||
`g810-led -kn d ff0000 # Set color of a key with no action`</br>
|
||||
`g810-led -c # Commit all changes`</br>
|
||||
`ledkeyboard -an 000000 # Set color of all key with no action`</br>
|
||||
`ledkeyboard -gn modifiers ff0000 # Set color of a group with no action`</br>
|
||||
`ledkeyboard -kn w ff0000 # Set color of a key with no action`</br>
|
||||
`ledkeyboard -kn a ff0000 # Set color of a key with no action`</br>
|
||||
`ledkeyboard -kn s ff0000 # Set color of a key with no action`</br>
|
||||
`ledkeyboard -kn d ff0000 # Set color of a key with no action`</br>
|
||||
`ledkeyboard -c # Commit all changes`</br>
|
||||
|
||||
## Samples for g610 :</br>
|
||||
`g610-led -a 60 # Set intensity of all keys`</br>
|
||||
`g610-led -k logo ff # Set intensity of a key`</br>
|
||||
`g610-led -g fkeys aa # Set intensity of a group of keys`</br>
|
||||
`ledkeyboard -a 60 # Set intensity of all keys`</br>
|
||||
`ledkeyboard -k logo ff # Set intensity of a key`</br>
|
||||
`ledkeyboard -g fkeys aa # Set intensity of a group of keys`</br>
|
||||
|
||||
## Samples for g213 :</br>
|
||||
`g213-led -a 00ff00 # Set all keys green`</br>
|
||||
`g213-led -r 1 ff0000 # Set region 1 red`</br>
|
||||
`ledkeyboard -a 00ff00 # Set all keys green`</br>
|
||||
`ledkeyboard -r 1 ff0000 # Set region 1 red`</br>
|
||||
|
||||
## Samples with pipe (for effects) :</br>
|
||||
`g810-led -pp < profilefile # Load a profile`</br>
|
||||
`echo -e "k w ff0000\nk a ff0000\nk s ff0000\nk d ff0000\nc" | g810-led -pp # Set multiple keys`</br>
|
||||
`ledkeyboard -pp < profilefile # Load a profile`</br>
|
||||
`echo -e "k w ff0000\nk a ff0000\nk s ff0000\nk d ff0000\nc" | ledkeyboard -pp # Set multiple keys`</br>
|
||||
|
||||
## Testing unsuported keyboards :</br>
|
||||
Start by retrieve the VendorID and the ProductID of your keyboard with lsusb.</br>
|
||||
@ -72,19 +66,19 @@ Start by retrieve the VendorID and the ProductID of your keyboard with lsusb.</b
|
||||
Sample return :<br>
|
||||
`Bus 001 Device 001: ID 046d:c331 Logitech, Inc.`</br>
|
||||
In this sample VendorID is 046d and ProductID is c331. Now test your keyboard with all supported protocol :</br>
|
||||
`g810-led -dv 046d -dp c331 -tuk 1 -a 000000`</br>
|
||||
`ledkeyboard -dv 046d -dp c331 -tuk 1 -a 000000`</br>
|
||||
If your keyboard set all key to off you have found the protocol (1), if not continue.</br>
|
||||
`g810-led -dv 046d -dp c331 -tuk 2 -a 000000`</br>
|
||||
`ledkeyboard -dv 046d -dp c331 -tuk 2 -a 000000`</br>
|
||||
If your keyboard set all key to off you have found the protocol (2), if not continue.</br>
|
||||
`g810-led -dv 046d -dp c331 -tuk 3 -a 000000`</br>
|
||||
`ledkeyboard -dv 046d -dp c331 -tuk 3 -a 000000`</br>
|
||||
If your keyboard set all key to off you have found the protocol (3), if not, need new dump.</br>
|
||||
|
||||
## Building and linking against the libg810-led library :</br>
|
||||
Include in implementing source files.</br>
|
||||
```cpp
|
||||
#include <g810-led/Keyboard.h>
|
||||
#include "Keyboard.h"
|
||||
```
|
||||
To link, simply provide `-lg810-led` to the build flags.</br>
|
||||
To link, simply provide `-llibledkeyboard` to the build flags.</br>
|
||||
|
||||
To build the g810-led application as a dynamically-linked variant, run the target:</br>
|
||||
`make bin-linked`</br>
|
||||
|
Loading…
Reference in New Issue
Block a user