All Projects → SebiTimeWaster → G213colors

SebiTimeWaster / G213colors

Licence: mit
A Python script to change the key colors on a Logitech G213 Prodigy Gaming Keyboard

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to G213colors

Android Keyboard
Android Keyboard with 180+ dictionaries. Support swipe input (sliding input), Emoji keyboard, AI predictions, dictionaries downloading, and keyboard themes.
Stars: ✭ 108 (-1.82%)
Mutual labels:  keyboard, led
uchroma
An advanced driver for Razer Chroma hardware in Linux
Stars: ✭ 45 (-59.09%)
Mutual labels:  keyboard, led
system-76-keyboards
Rainbow / CPU monitor for system76 colored keyboards
Stars: ✭ 37 (-66.36%)
Mutual labels:  keyboard, colors
Swipeselection
An improvement to iOS's text editing that allows you to move the cursor and select text using gestures on the keyboard itself.
Stars: ✭ 97 (-11.82%)
Mutual labels:  keyboard
Rgb
Offline smart home - esp8266 and WS2811/WS2812/NeoPixel LEDs Smart home / Gudra māja / Умны дом
Stars: ✭ 99 (-10%)
Mutual labels:  led
Keyboardavoider
The missing interactive keyboard in SwiftUI for iOS
Stars: ✭ 105 (-4.55%)
Mutual labels:  keyboard
React Native Dismiss Keyboard
A simple way to dismiss the keyboard programmatically in a react native application
Stars: ✭ 97 (-11.82%)
Mutual labels:  keyboard
Karabiner Driverkit Virtualhiddevice
Stars: ✭ 108 (-1.82%)
Mutual labels:  keyboard
Ally.js
JavaScript library to help modern web applications with accessibility concerns
Stars: ✭ 1,447 (+1215.45%)
Mutual labels:  keyboard
Nord Termite
An arctic, north-bluish clean and elegant Termite color theme.
Stars: ✭ 104 (-5.45%)
Mutual labels:  colors
Colorify
Colorify - simple, yet powerful color library.
Stars: ✭ 106 (-3.64%)
Mutual labels:  colors
Uiviewcontroller Keyboardadditions
Tiny UIViewController category that provides handy way for keyboard handling logic.
Stars: ✭ 102 (-7.27%)
Mutual labels:  keyboard
Digitalkeyboard
手动实现简单的身份证数字键盘
Stars: ✭ 99 (-10%)
Mutual labels:  keyboard
Hyperapp Fx
Effects for use with Hyperapp
Stars: ✭ 105 (-4.55%)
Mutual labels:  keyboard
Photon.vim
An elegant pair of Vim colour schemes with minimal syntax highlighting that care about the little details.
Stars: ✭ 98 (-10.91%)
Mutual labels:  colors
Rainbow
Because everybody loves rainbows.
Stars: ✭ 108 (-1.82%)
Mutual labels:  colors
Values.js
🍇 Get the tints and shades of a color
Stars: ✭ 97 (-11.82%)
Mutual labels:  colors
Lhskeyboardadjusting
An easy-to-use Objective-C protocol that automatically resizes / adjusts views when a keyboard appears on iOS.
Stars: ✭ 101 (-8.18%)
Mutual labels:  keyboard
Wled Wemos Shield
Wemos D1 Mini (ESP8266) or Wemos ESP32 D1 Mini (ESP32) based shield for WLED firmware
Stars: ✭ 105 (-4.55%)
Mutual labels:  led
Pi As Keyboard
Make your Raspberry act as a Keyboard
Stars: ✭ 109 (-0.91%)
Mutual labels:  keyboard

G213Colors

A script to change the key colors on a Logitech G213 Prodigy Gaming Keyboard.

Please also check out these awesome forks:

G213Colors GUI - A cool grafical GUI you can use from the main menu

G213Colors GUI + installation script - The GUI plus an easy installation script

Thanks to derEisele and JeroenED for creating this!

What it does

G213Colors lets you set the color(s) and certain effects of the illuminated keys on a G213 keyboard under Linux.

The original Software and Hardware has the following downsides:

  • There is no Linux software
  • The keyboard does not save the last setting, one has to re-set it every bootup / disconnect
  • The keyboard starts up with an annoying color cycle animation
  • The original software is unusable with KVM switches

So i decided to reverse engineer their USB protocol and to write my own script to control the keyboard.

G213Colors was built and tested under Linux for the G213 keyboard specifically, but after some adaptation it could potentially be run under other OS'es and used for other Logitech keyboards as well. Please understand that i do not support any such adaptation, if you want to do it you are on your own.

The "Wave" color effect that is available with the Logitech software could not be replicated since it is completely generated in the software by updating the colors every x ms (In contrast to the other effects which run on the keyboard itself). You could generate this effect with a script, but since G213Colors has to detach the kernel driver from one of the G213's interfaces to send data out the multimedia keys would most likely stop working. Unfortunately this is a side effect of the linux driver structure.

Installation

Either download the G213Colors.py file to a directory of your choosing or clone this project with git.

Prerequisites

If you run the script as Root (Which is likely) please install the libraries also as root (E.g.: sudo pip3 install pyusb, sudo pip3 install randomcolor, use only "pip" for Python 2).

Please ignore the pcap directory, i added the pcap files i used for reverse engineering just in case someone wants to work with them. They can be opened with Wireshark.

Usage

For help on how to use G213Colors call the script without any arguments:

sudo python G213Colors.py

G213Colors needs to run as root as long as your user doesn't have access privileges for that USB device (How to do this, please use "046d" as idVendor and "c336" as idProduct).

If you want to run the script when the keyboard is plugged in (For instance if you use a USB switch or KVM switch) use this udev rule (In this case the script is run by root):

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", RUN+="/usr/bin/python /usr/local/bin/G213Colors.py -c 4F7F9F"

Changelog

Changelog v0.3:

  • Added feature: Assign random colors to keyboard by using -ra or -rs flag

Changelog v0.2:

  • Fixed bug preventing setting all 5 color fields correctly, thanks to @oncecreated for finding this solution!
  • Added propper validation of user inputs
  • Complete refactoring

Changelog v0.1:

  • Initial checkin
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].