Package: dtv2
Some important notesThis python module handles key coloring of the Drevo Tyrfing v2
keyboard, especially for linux users ; nevertheless it should work
under other platforms.Requirementsdtv2needshidapilibrary:pip3 install hidapiandcolourlibrary:pip3 install colour. These dependances are notified in
thePypisetupfile, so that if you install viapipcommand, you have nothing to do.You may need to installlibhidapi-hidrawdynamic library on your
system. For debian users:$ sudo apt install libhidapi-hidraw0Notepythonhidapilibrary may confict with pythonhidlibrary, you may need to uninstallhidlibrary.InstallationCopy the99-drevo-tyrfing.rulesin the/etc/udev/rules.d/directory to grant user with permissions for to send/write
informations to the keyboard. Restart or# udevadm trigger.pip3 install dtv2UsageWith friendly scriptsdtv2changeLive change and eventually store.$./bin/dtv2change-h
usage:dtv2change[-h][-V][-r][-n][-a][-kbdKEYBOARD][-catCATEGORY[CATEGORY...]][-keyKEY[KEY...]]ChangeDrevotyrfingkeyscolors

optionalarguments:-h,--helpshowthishelpmessageandexit-V,--versiondisplayversion(lastmodif.date)-r,--readreadandapplysavedconfig-n,--newreplaceorcreateconfigfile-a,--appendchangeconfigwithargsandstorechanges-kbdKEYBOARD,--keyboardKEYBOARDsvg_color_nameorhexcoloror[rgb|hsl]=(.25,1,.5)-catCATEGORY[CATEGORY...],--categoryCATEGORY[CATEGORY...]category_namesvg_color_nameorhexcoloror[rgb|hsl]=(.25,1,.5)-keyKEY[KEY...],--keyKEY[KEY...]key_namesvg_color_nameorhexcoloror[rgb|hsl]=(.25,1,.5)dtv2rdrRead config JSON files and apply changes.$dtv2reader-h
usage:dtv2reader[-h][-V]filename

ChangeDrevotyrfingkeyscolors

positionalarguments:filenameconfig_file_name(json)optionalarguments:-h,--helpshowthishelpmessageandexit-V,--versiondisplayversion(lastmodif.date)As a moduleimportdtv2my_kbd=dtv2.dtv2()# mem_effect: the more you type the more color changemy_kbd.mem_effect((0,0,255),color2=(255,0,0),brightness=100)# radar: rays turn around central key (direction: 0 or 1)my_kbd.radar((0,0,255),color2=(255,0,0),brightness=100,speed=100,direction=0)# static: simple static color or if rainbow=True alternate rainbow colorsmy_kbd.static((0,0,255),brightness=100,speed=100,rainbow=False)# breath: breath effectmy_kbd.breath((0,0,255),brightness=100,speed=100)# stream: stream effect (direction = 'n' or 's' or 'e' or 'w')my_kbd.stream((0,0,255),color2=(255,0,0),brightness=100,speed=100,direction='e',rainbow=False)# category: change color of a whole category ('letters', 'digits', 'arrows', 'function', 'mod', 'edition')my_kbd.category('arrows',(255,0,0))# key_set: list of keys and list of colorsmy_kbd.key_set(['esc','space'],[(255,0,0),(0,255,0)])my_kbd.key_set({'esc':(255,0,0),'space':(0,255,0)})my_kbd.key_set([('esc',(255,0,0)),('space',(0,255,0)])my_kbd.key_set((('esc',(255,0,0)),('space',(0,255,0)))# key: simple key color changemy_kbd.key('esc',(255,0,0))For the momentrainbowinstaticmode can be tricky and affect
other effects.Using simplekeyorcategorymodes enter personal mode so exit
all others. It can be boring to affect each key of the keyboard to
the same color so there's this special method in personal mode to
change all the keyboard color (and then you can change categories
colors and finally some individual keys):kbdmy_kbd.kbd((255,0,0))my_kbd.category('letters',(0,0,255))my_kbd.key('space',(0,0,255))RecapIf you need a monocolor keyboard:staticorkbd.If you want some effects:mem_effect,radar,static(with
rainbow)breathorstream.If you want to personalize categories or some keys:kbd,categorykey_setandkey.An example usage is provided in theexamplesdirectory. It usescolourpackageto allow human
color names instead of hex triplets!ExamplesIn theexamples
section,
you'll find aREADMEfile to usedtv2changeanddtv2readerscripts.First steps and thanksI did my first steps in this project with a prefix from:https://github.com/dennisblokland/DrevoTyrfingI followedFlozz'stutorial (on a mouse)So: I used wireshark to find other command prefixes.USB hid tables(for missing french key codes)Zer0xFFproposed some changes making
individual key color assignments really usable.onekkadded 104-keys keyboard
compatibility, support ofitalian version and other useful things
on key categories.And now?Fix bugsAdd functionalities...LicenseCC-BY-NC-SA