Open Glaferg opened 3 years ago
UPDATE: Does anyone know how to assign a color to one key?
Razer-macos just takes code from the openrazer driver, changes some code to be compatible with macOS libraries and offers the functionality with a node.js addon (you could call it a small C++ bridge). It does not offer it as driver files you could write / read to like openrazer does.
A bit more background info: With openrazer you are able to open your Razer devices like files on your drive and read and write to them. An example of such a device file can look like this (RAZER_NOMMO_CHROMA): /sys/bus/hid/drivers/razeraccessory/:0X1532:0X0517.
Assigning a single color to one key is done with the matrix_custom_frame command. It takes an array of values as an input parameter. The array is a bit special as the first 3 value just contain the information to which region (row / columns) the following values should be applied to. The values itself are just color information at the end.
This is SUPER useful, but I still have no idea where my OpenRazer files are on MacOS. Razer Macos runs beautifully but where is the directory storing those values?
As I said, these driver files are not accessible with razer-macos as razer-macos works differently.
In other words, there is currently no option to send naked commands to this low-level api.
welp frick. Any way to mod a version and force it to send per-key raw commands or mod the code to add a function to do what I want?
If mod = code then yes, plenty. If I'd take a direction I would most probably expose a small http server api (swagger).
How can I get started with this modification and then possibly add a Python API that is controllable from the GUI... @dhobi
Just to be clear here: Currently Razer macOS provides no possibility to be controlled by an external process. What I mentioned in the previous comment was the direction I'd go to make that possible with the current stack/architecture we have. If (and only if) this is done, you could control your Razer devices connected to a Mac with anything which is able to do http requests. That would also include cli programs like curl / wget.
I am looking to create a key-specific layout for an application and I cannot comprehend how the OpenRazer driver fits in. I cannot find it, I cannot write commands to it, and I am totally confused. Can someone give me some tips on how to open it and how to write commands to it?