Comments (7)
I tried to make it async but probably missed something obvious Image
(I added an event handler to the main file)
Note: I have no idea what im doing ^
from rgb_keyboard.
The official software implements changing multiple keys in a single packet, this software does not (one packet per key is used), that is the main reason for the speed difference. I chose to implement it this way because less reverse engineering effort would be required.
Custom animations are certainly a nice feature, and i would welcome your efforts. A few things i would keep in mind about the potential design:
- The existing code sucks (in some places more than in others), rewriting parts might be good
- Different keyboards use different keycodes to change the individual key colors
- How should animations be defined? I would prefer having animations as executables in a scripting language that simply call rgb_keyboard, mabe a Lua or Python API should be created for that.
- I personally wouldn't bother with the async libusb API as the biggest speedup should come from changing multiple keys in a single packet. However I won't reject it if you got the async API working.
- The key colors are stored on the keyboard, constantly changing them could wear out the flash(?) storage of the controller
As far as capturing USB data goes:
A simple description:
https://github.com/dokutan/rgb_keyboard/tree/master/doc#capturing-usb-data
More detailed explanations:
https://bytepunk.wordpress.com/2017/03/25/reverse-engineering-a-usb-mouse/
https://github.com/pez2001/razer_chroma_drivers/wiki/Reverse-Engineering-USB-Protocol
I hope this answers your questions, feel free to ask if there is anything else.
from rgb_keyboard.
Thanks for the information.
I didnt think about the flash memory, but probably shouldve - there's no way to just change the color without updating the memory I'd assume.
How should animations be defined?
welllll i was just gonna hardcode anything i wanted :P
I tried for async but it didnt work properly for me, everything probably has to go in order anyway.
from rgb_keyboard.
Also before i mess with this more, im probably going to port it to kotlin so i can work with it easily, but i'll at least post how to change multiple at a time once i figure it out
from rgb_keyboard.
It appears to be section based, and sequential. This made all the function keys white
Just one question: Do you have any idea what the first half of the packet is?
from rgb_keyboard.
The first half is just protocol overhead, you generally only have to consider the highlighted data section, with exception of transfer parameters, e.g. endpoints.
from rgb_keyboard.
I'm closing this as your questions seem to be answered and no implementation of a custom animation API is currently planned (due to the flash memory problem).
from rgb_keyboard.
Related Issues (20)
- Add PKGBUILD and publish Arch Linux package? HOT 11
- Redragon K552RGB-1 -- Testing HOT 8
- Redragon K552RGB-1 ABNT2 (Brazilian Layout) Keymapping problem HOT 2
- Tecware Phantom RGB TKL- Keymapping doesn't seem to work. HOT 7
- Couldn't execute "rgb_keyboard" (GUI) HOT 2
- Redragon SURARA K582 support HOT 3
- Redragon K512 Support HOT 1
- (Not bug) Custom patterns HOT 1
- Custom Pattern Documentation HOT 1
- GMMK TKL keyboard doesn't work with example commands. HOT 4
- Redragon Draconic HOT 2
- Could not detect keyboard - GMMK Pro HOT 5
- Can read keyboard but result never changes HOT 5
- Redragon k552-kr kumara not working HOT 1
- Redragon K589 Shrapnel compatibility HOT 3
- Redragon k585 color support for multiple profiles HOT 1
- redragon k582 surara not working
- Support for Redragon Fizz k617 HOT 1
- Running the example.conf flickers some keyboard leds and never actually changes the colors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rgb_keyboard.