Welcome to retracile.net, my dusty little corner of the internet.
Read more AboutMe and peruse my Resume; or browse my Projects. Drop me an email to make a comment or ask a question.
Browse by time:
- October 2024 (1)
- September 2024 (1)
- August 2024 (1)
- July 2024 (1)
- June 2024 (1)
- May 2024 (1)
- April 2024 (1)
- March 2024 (1)
- February 2024 (1)
- January 2024 (1)
- November 2023 (1)
- October 2023 (1)
- September 2023 (1)
- August 2023 (1)
- July 2023 (1)
- June 2023 (1)
- May 2023 (1)
- April 2023 (1)
- March 2023 (1)
- February 2023 (1)
- January 2023 (1)
- December 2022 (1)
- November 2022 (1)
- October 2022 (1)
- September 2022 (1)
- August 2022 (1)
- July 2022 (1)
- May 2022 (1)
- March 2022 (1)
- February 2022 (1)
- January 2022 (1)
- December 2021 (1)
- November 2021 (1)
- October 2021 (1)
- September 2021 (1)
- August 2021 (1)
- July 2021 (2)
- February 2020 (1)
- December 2019 (1)
- October 2019 (2)
- August 2019 (1)
- July 2019 (1)
- June 2019 (1)
- May 2019 (1)
- April 2019 (1)
- March 2019 (1)
- February 2019 (2)
- November 2018 (1)
- August 2018 (1)
- October 2017 (1)
- September 2017 (1)
- August 2017 (1)
- July 2017 (1)
- June 2017 (1)
- May 2017 (1)
- April 2017 (1)
- March 2017 (2)
- January 2017 (1)
- December 2015 (1)
- November 2015 (2)
- September 2015 (1)
- July 2015 (2)
- January 2015 (2)
- December 2014 (1)
- September 2014 (1)
- August 2014 (1)
- July 2014 (1)
- May 2014 (3)
- April 2014 (1)
- October 2013 (1)
- September 2013 (1)
- June 2013 (2)
- May 2013 (1)
- December 2012 (1)
- August 2012 (2)
- January 2012 (1)
- December 2011 (1)
- August 2011 (2)
- June 2011 (1)
- February 2011 (1)
- January 2011 (1)
- November 2010 (1)
- April 2010 (1)
- December 2009 (2)
- November 2009 (2)
- October 2009 (3)
- July 2009 (1)
- June 2009 (1)
- May 2009 (1)
- April 2009 (1)
- February 2009 (2)
- November 2008 (1)
- May 2008 (1)
- March 2008 (2)
Browse by category:
- rss 3d-printing (3)
- rss android (6)
- rss aqemu (1)
- rss bash (2)
- rss book (1)
- rss bug (2)
- rss cellphone (2)
- rss centos (1)
- rss computer (2)
- rss construction (2)
- rss corsair-gaming-k70-rgb (5)
- rss corsair-gaming-k95-rgb (4)
- rss creality (1)
- rss diff (1)
- rss electrical (3)
- rss email (1)
- rss ender-3-pro (1)
- rss fedora (2)
- rss flashlight (1)
- rss food (1)
- rss history (9)
- rss kde (2)
- rss keyboard (5)
- rss kmail (1)
- rss ldglite (2)
- rss ldraw (28)
- rss ldraw-parts-library (20)
- rss ldview (4)
- rss lego (40)
- rss leocad (5)
- rss linux (40)
- rss lpub4 (4)
- rss macos (1)
- rss math (1)
- rss metal-working (3)
- rss mindstorms (4)
- rss music (9)
- rss numbers (1)
- rss office (2)
- rss openSCAD (2)
- rss openid (1)
- rss playset (1)
- rss programming (6)
- rss python (16)
- rss quick-grid-zones (3)
- rss router (1)
- rss rubik's-cube (2)
- rss sabaton (9)
- rss security (3)
- rss sewing (1)
- rss software (14)
- rss subversion (1)
- rss trac (2)
- rss truck (2)
- rss vim (9)
- rss weapons (2)
- rss windows (1)
- rss wood-working (6)
Driving Corsair Gaming keyboards on Linux with Python, II
Since I wrote about Driving the Corsair Gaming K70 RGB keyboard on Linux with Python, the ckb project has released v0.2. With that came changes to the protocol used to communicate with ckb-daemon which broke my rgbkbd tool.
So I had to do some work on the code. But that wasn't the only thing I tackled.
The 0.2 release of rgbkbd includes:
- Updates the code to work with ckb-daemon v0.2
- Adds support for the K95-RGB, in addition to the existing support for the K70-RGB.
- Adds a key-stroke driven "ripple" effect.
- Adds a "falling-letter" animation, inspired by a screen saver which was inspired by The Matrix.
- Adds support for displaying images on the keyboard, with a couple of example images.
- Adds support for displaying animated GIFs on the keyboard, with an example animated GIF.
That's right; you can play animated GIFs on these keyboards. The keyboards have a very low resolution, obviously, but internally, I represent them as an image sized based on a standard key being 2x2 pixels. That allows for half-key offsets in the mapping of pixels to keys which gets a reasonable approximation. Keys are colored based on averaging the color of the pixels for that key. Larger keys are backed by more pixels. If the image dimensions don't match the dimensions of the keyboard's image buffer (46x14 for K70, 53x14 for K95), it will slowly scroll around the image. Since the ideal image size depends on the keyboard model, the image files are segregated by model name.
Here is what that looks like:
(Also available on YouTube)
Grab the source code and have fun.
Update: Driving Corsair Gaming keyboards on Linux with Python, III
- Posted: 9 years ago (Updated: 9 years ago)
- Categories: corsair-gaming-k70-rgb python corsair-gaming-k95-rgb linux keyboard software
- Comments (0)