Open ekng331 opened 3 years ago
Hi Nanthan, currently you can call the openrazer api in this app with Javascript only. Python scripting is not yet available, but I think it is possible to implement.
Keep in mind the apis in this project are only a subset of openrazer's, as they had to be manually rewriten on Mac.
Hi, is there any page where I can find the documentation?
Its not super well documented but I can point you to the right direction. At the bottom of https://github.com/1kc/razer-macos/blob/master/src/driver/addon.cc , you will see a list of functions that you can call from Javascript. These functions will in turn call the C driver functions for you.
For example:
import addon from '../driver'
addon.kbdSetModeStatic(new Uint8Array([0xff,0,0]))} // Set entire keyboard to red
We are not at the stage where we can set colours for individual keys yet. Maybe that is something you could look into porting over if you are interested?
Yes, I am interested. Could you please give some explanation on your porting process and also maybe documentation for the original code?
Here is a simple explanation here regarding the porting the driver code, https://github.com/1kc/razer-macos/wiki.
The process goes:
How do I set everything up to begin?
In the open razer project, there is an ability to program your keyboard using their api via python scripting. Is this feature available in the mac port as well? Here are the provided examples of the scripts: https://github.com/openrazer/openrazer/tree/master/examples
Thanks in advance!