Some functions to handle color management on the Drevo Tyrfing V2
Project description
Installation
-
Put the
99-drevo-tyrfing.rules
in the/etc/udev/rules.d
directory to grant user permissions for to send/write informations to the keyboard. -
pip3 install dtv2
-
(optional) Use
tyrfingcfg.py
script (inexemples
directory) to change keys colors (whole keyboard, categories and/or just some keys) using svg color names. See examples at the end.
Drevo Tyrfing helper functions
Python module to manage key color assignments on the Drevo Tyrfing v2 keyboard.
import dtv2
my_kbd = dtv2.dtv2()
my_kbd.change_kbd_color((0, 0, 0))
my_kbd.change_cat_color("arrows", (0, 0x80, 0))
my_kbd.change_key_color('esc', (0xff, 0, 0))
key identifiers and command prefix found at
https://github.com/dennisblokland/DrevoTyrfing
Nevertheless I noticed RGB preceeds spacer on the DTV2, so that the script send 31 bytes instead of 32.
USB hid tables (for missing french key codes)
example script
The script exemples/tyrfingcfg.py
shows how to use the module.
Some config to try:
python3 tyrfingcfg.py -kbd white -cat letters green mod gold function red edition yellow digits gray arrows cyan -key space blue esc blue enter lightblue
python3 tyrfingcfg.py -kbd black -cat letters gray
python3 tyrfingcfg.py -kbd black -cat letters gray -key space gray enter gray tab gray
Thanks
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.