Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work with any qmk keyboard ?? #1

Open
epokuser opened this issue Sep 6, 2023 · 3 comments
Open

Does this work with any qmk keyboard ?? #1

epokuser opened this issue Sep 6, 2023 · 3 comments

Comments

@epokuser
Copy link

epokuser commented Sep 6, 2023

any qmk keyboard , any layout?

@epokuser
Copy link
Author

epokuser commented Sep 6, 2023

btw how can I use this? do i just run the script ?

@Perksey
Copy link
Contributor

Perksey commented Sep 8, 2023

Hi there! It will work for any keyboard that has an info.json file containing a layout within its rgb_matrix property. An example is the Drop Sense75 which looks like this:

...
    "rgb_matrix":
...
        "layout": [
            {"flags": 2, "x": 2, "y": 0},
            {"flags": 2, "x": 22, "y": 0},
            {"flags": 2, "x": 42, "y": 0},
            {"flags": 2, "x": 62, "y": 0},
            {"flags": 2, "x": 82, "y": 0},
            {"flags": 2, "x": 102, "y": 0},
            {"flags": 2, "x": 122, "y": 0},
            {"flags": 2, "x": 142, "y": 0},
            {"flags": 2, "x": 162, "y": 0},
            {"flags": 2, "x": 182, "y": 0},
            {"flags": 2, "x": 202, "y": 0},
            {"flags": 2, "x": 222, "y": 0},
            {"flags": 2, "x": 0, "y": 7},
            {"flags": 4, "matrix": [0, 0], "x": 6, "y": 8},
            {"flags": 4, "matrix": [0, 1], "x": 24, "y": 8},
            {"flags": 4, "matrix": [0, 2], "x": 37, "y": 8},
            {"flags": 4, "matrix": [0, 3], "x": 51, "y": 8},
            {"flags": 4, "matrix": [0, 4], "x": 66, "y": 8},
            {"flags": 4, "matrix": [0, 5], "x": 82, "y": 8},
...

To run the script, pass in the path to the file (or a glob expression to multiple files) and it will read it and generate the plugin. e.g.:

python ./qmk2srgb.py path/to/my/info.json -o generated

@Perksey
Copy link
Contributor

Perksey commented Sep 8, 2023

You can get those files from the qmk_firmware repo, but I'll save you some time, all of the (limited number of) keyboards this generator currently works with have plugins in the srgbmods repo in the needs-testing branch: https://github.com/SRGBmods/qmk-plugins/tree/needs-testing

Simply add that as an addon in SignalRGB and point it at that branch and you'll have all the extra plugins it can generate today. I believe the SRBGmods people are trying to backfill this information for the various keyboards (they're currently experimenting with the Keychron K4 Pro)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants