Skip to content

zauguin/libx50q

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experimental cross platform C++ library to control colors for Das Keyboard X50Q

Only tested on Linux, but theoretically Windows and Mac should work too. Based on hidapi and libusb. On Linux the hidraw backend for hidapi is recommended over the libusb API since otherwise media keys don't work while the library is active.

This has been written without any official documentation of the interfaces from the vendor and is purely based on observing the behavior of the Windows driver. It might brick your keyboard. Use at your own risk.

Requirements

All of this should be available from most package managers.

Compilation

Currently the library is header-only, but some examples can be compiled with make.

Remarks

Changing a single key color requires to reset the color of all the keys, so in order to change the color of only a single key, your program has to keep track of the color of all other keys. There does not seem to be a way to query them.

This library only deals with low-level communication with the keyboard and does not do any such state tracking.

The library often uses arrays of 144 codes. The order does not correspond to any kind of common scancodes/keycodes/whatever that I've seen before and sometimes feels rather random. Since the keyboard does not actually contain 144 keys it also has quite some holes in rather random positions. Colors/effects/... written to these position seem to get ignored. The test example in the demo directory demonstrates all available positions and the source contains a list of the codes in a slightly more sensible order.

Examples

single_color.cpp and rainbow.cpp demonstrate the general interface of the library. Both can be found under demo. They might also be a useful on their own. (single_colorsets the keyboard to a single color chosen by the user,rainbow` recreates the animated rainbow pattern the keyboard gets shipped with)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published