Skip to content

Controller for the backlight of the Lenovo Legion Y720 keyboard.

License

Notifications You must be signed in to change notification settings

seanclancy/Lenovo-Y720-KB-Led-Controller

 
 

Repository files navigation

Lenovo-Y720-KB-Led-Controller

Github releases (by asset) Dependency Status Donate

This software controls the backlight of Lenovo Legion Y720 Keyboard on Linux, as the Lenovo didn't make the drivers/software for Linux.

It works mostly the same as the Lenovo Nerve Center, including the global hotkey of Fn+Space to change between profiles created by the user and the hotkey that is located in the key 7 of the numpad this hotkey opens the software.

Here a screenshot:

Screenshot from 2021-04-09 14-41-02

How to install

Download the latest version here: Releases

You can use the AppImage to run just once the software using this in a terminal with the folder you downloaded the software open

./Lenovo Y720 Keyboard LED Controller-x.AppImage

Or you can install the deb packages using:

sudo dpkg -i y720-kb-led-controller-x.deb

How to grant access to Hidraw and Input device

Hidraw device is used for controlling the leds and the input device is used to detect the hotkey Fn+Space.

Create a file called /etc/udev/rules.d/99-any-name-you-want.rules and write this to the file

SUBSYSTEM=="hidraw", ATTRS{name}=="ITE33D1:00", MODE="0666"
SUBSYSTEM=="input", ATTRS{name}=="*Keyboard*", MODE="0666"

Reboot your PC or use this command to reload and trigger the new udev rules sudo udevadm control --reload-rules && sudo udevadm trigger

DEV

Recommendations

  • VSCode with the extensions listed below
    • Better C++ Syntax
    • Better Shell Syntax
    • C/C++ Extension Pack by Microsoft
    • CodeLLDB (to debug things if you know what you're doing)
    • EditorConfig for VS Code
    • Shell Script Command Completion
    • ShellCheck (if you want to use this extension follow their guide on how to install it)
  • Patience

Requirements to build or start the dev version

  • GCC/G++
  • yarn
  • libevdev (the needed files are already in the ./libs/hotkey/libs folder, but you never know ¯_(ツ)_/¯ )
  • node-gyp (I do recommend to globally install it using either npm install -g node-gyp or yarn global add node-gyp)

How to build it yourself

  1. First clone the repo
git clone https://github.com/Izurii/Lenovo-Y720-KB-Led-Controller
  1. Build
yarn build

How to start the software using yarn

yarn start

Good to know

  • Both scripts (build and start) has a lot of things behind doing all the dirty work.
  • yarn run build or yarn build do these actions:
    • As soon as you run the command, yarn will trigger the "prebuild" script, the prebuild script is going to run the sh file ./scripts/prebuild_start.sh. This shell script is going to run all the things needed to build the application, take a look at the script and see what it does.
    • The same logic applies to yarn run start it runs the file ./scripts/prebuild_start.sh
  • You can take a look at the README inside the folder ./scripts if you want more details in what those scripts is doing.
  • I wrote some details how the addons I built for the app works

About

Controller for the backlight of the Lenovo Legion Y720 keyboard.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 67.4%
  • TypeScript 14.6%
  • Shell 7.2%
  • C++ 5.3%
  • HTML 4.5%
  • Python 0.6%
  • Makefile 0.4%