{"id":18374940,"url":"https://github.com/grieferatwork/msi-kbrgb","last_synced_at":"2025-09-21T00:45:17.964Z","repository":{"id":115114799,"uuid":"273769851","full_name":"GrieferAtWork/msi-kbrgb","owner":"GrieferAtWork","description":"A single-source-file C program to set the colors of a 3-region MSI keyboard.","archived":false,"fork":false,"pushed_at":"2020-06-21T08:58:00.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-22T22:50:39.452Z","etag":null,"topics":["c","color","commandline","keyboard","laptop","msi","notebook","rgb"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrieferAtWork.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-20T19:15:12.000Z","updated_at":"2020-06-21T08:58:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"49c421a7-f9f1-41bd-abe0-21a5cbb22f4f","html_url":"https://github.com/GrieferAtWork/msi-kbrgb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GrieferAtWork/msi-kbrgb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrieferAtWork%2Fmsi-kbrgb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrieferAtWork%2Fmsi-kbrgb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrieferAtWork%2Fmsi-kbrgb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrieferAtWork%2Fmsi-kbrgb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrieferAtWork","download_url":"https://codeload.github.com/GrieferAtWork/msi-kbrgb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrieferAtWork%2Fmsi-kbrgb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276179882,"owners_count":25598571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","color","commandline","keyboard","laptop","msi","notebook","rgb"],"created_at":"2024-11-06T00:16:45.628Z","updated_at":"2025-09-21T00:45:17.942Z","avatar_url":"https://github.com/GrieferAtWork.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n# msi-kbrgb\r\nA single-source-file C program to set the colors of a 3-region MSI keyboard. \r\n\r\n# Disclaimer\r\nI did not reverse engineer the /magic/ used here myself. And looking around github in regards to the subject of home-made programs to set the colors of these keyboard, there's already more than one of them. However, none of the ones I managed to find were what this repo now holds: A simple, single-source-file, (probably portable), commandline C program with minimal dependencies\r\n\r\n# The Magic\r\nThere really isn't too much to it, but you can just look between the `/* BEGIN: Magic */ ... /* END: Magic */` regions to take a look at the /magic/ constants and command sequences that must be sent to an HID device `vendor_id: 0x1770, product_id: 0xff00`\r\n\r\n# Usage\r\nThe program is self-documenting, and you can run `kbrgb --help`, but here are some examples:\r\n- `kbrgb m:normal p:all:green:h` (Make the whole keyboard green)\r\n- `kbrgb m:normal p:l:red:h p:m:green:h p:r:blue:h` (Make the whole keyboard RGB (RedGreenBlue))\r\n- ...\r\n\r\n# Dependencies\r\nYou will need to have installed:\r\n- A couple of standard-C headers (see top of `main.c`)\r\n- [`hidapi`](https://github.com/signal11/hidapi)\r\n\t- If you're using cygwin (like me), you don't even have to install this one from source.  \r\n\t  Instead, from the cygwin installer, install the following packages:\r\n\t\t- `libhidapi-devel`\r\n\t\t- `libhidapi0`\r\nAnd that's it\r\n\r\n# Building\r\nJust run `make` from the cloned repo, or do your own `gcc -o kbrgb main.c -lhidapi` (after all: it's only a single source file)\r\n\r\n# Tipps\r\nSince (at least for my laptop), the default color of the keyboard is all-red after boot (and I have yet to find a way of changing this), I've had the quite neat idea of setting up scheduled tasks to run the following:\r\n- During logon: `kbrgb m:normal p:all:green:h`\r\n- During logoff: `kbrgb m:normal p:all:red:h`\r\n\r\nMeaning that while I'm logged in, the keyboard is green, but while I'm logged off, it's red (and since red is the default color, it will also be red until I log on for the first time)\r\nI think that's rather neat :)\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrieferatwork%2Fmsi-kbrgb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrieferatwork%2Fmsi-kbrgb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrieferatwork%2Fmsi-kbrgb/lists"}