{"id":16594521,"url":"https://github.com/stephenlacy/msi-keyboard","last_synced_at":"2025-04-06T12:09:52.237Z","repository":{"id":11916519,"uuid":"14482149","full_name":"stephenlacy/msi-keyboard","owner":"stephenlacy","description":"MSI SteelSeries Keyboard LED Controller","archived":false,"fork":false,"pushed_at":"2022-05-02T17:29:49.000Z","size":49,"stargazers_count":308,"open_issues_count":1,"forks_count":58,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-30T11:07:17.162Z","etag":null,"topics":["hardware","led","linux","msi-keyboard","steelseries-keyboard"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephenlacy.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}},"created_at":"2013-11-18T03:54:57.000Z","updated_at":"2024-10-12T19:48:50.000Z","dependencies_parsed_at":"2022-09-14T18:50:58.103Z","dependency_job_id":null,"html_url":"https://github.com/stephenlacy/msi-keyboard","commit_stats":null,"previous_names":["stephenlacy/msi-keyboard","stevelacy/msi-keyboard"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlacy%2Fmsi-keyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlacy%2Fmsi-keyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlacy%2Fmsi-keyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlacy%2Fmsi-keyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenlacy","download_url":"https://codeload.github.com/stephenlacy/msi-keyboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478323,"owners_count":20945266,"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","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":["hardware","led","linux","msi-keyboard","steelseries-keyboard"],"created_at":"2024-10-11T23:46:30.922Z","updated_at":"2025-04-06T12:09:52.218Z","avatar_url":"https://github.com/stephenlacy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MSI Keyboard LED Controller\n\n\u003e OS independent* LED Controller for MSI Steelseries laptop keyboards Using Node.js\n\n[![NPM version](https://badge.fury.io/js/msi-keyboard.png)](http://badge.fury.io/js/msi-keyboard)\n\n## Information\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003ePackage\u003c/td\u003e\u003ctd\u003emsi-keyboard\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003ctd\u003eMSI Keyboard LED Controller\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eHardware\u003c/td\u003e\n\u003ctd\u003eMSI GE, GT Steelseries Keyboard\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eNode Version\u003c/td\u003e\n\u003ctd\u003e\u003e= 0.4\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n![keyboard](https://i.cloudup.com/V7zz0ZdHT8.png)\n\n### [Looking for a GUI application?](https://github.com/stevelacy/msi-keyboard-gui)\n\n## Usage\n\nMake sure you have the needed usb lib requirements for your OS.\n\nThis project now supports full RGB/hex colors.\n\nGeneric Linux: `libusb-dev` `libusb-1.0-0-dev`\n\n#### Use it as command line :\nhttps://github.com/Kwaadpepper/msi-keyboard-CLI\n\n#### if using as a stand alone module:\n\n`npm install`\n\n### Note:\nLinux and *nix systems may require sudo to access the hid device interface.\n\n*Not tested on all platforms.\nPlatform tests appreciated\n\n\n```javascript\n// require the LED module\nvar keyboard = require('msi-keyboard')();\n\n// Set left region to high intensity, color red\nkeyboard.color('left', {\n  color: 'red',\n  intensity: 'high'\n});\n\n// Set middle region to green default high intensity\nkeyboard.color('middle', 'green');\n\n\n// Set right region to blue with light intensity\nkeyboard.color('right', {\n  color: 'blue',\n  intensity: 'light',\n});\n\n\n// Hardware modes\n// Setting .color() will Not affect the hardware defined colors for modes\n\n// Set Hardware mode to breath\nkeyboard.mode('breathe', 'green');\n\n\n// Blinking\n// Set the keyboard.color() Before calling .blink()\n// Refer to examples/blinkMulti.js\n\n// Blink all the keyboard LEDs to 750ms\nkeyboard.blink(750);\n\n\n// Blink Only left and right regions at 750ms\nkeyboard.blink(['left','right'], 750);\n\n\n// Use the default blink, time: 1000ms\nkeyboard.blink();\n\n\n// Stop the blink after 5000ms\nsetTimeout(keyboard.stopBlink, 5000);\n\n```\n\n\n\n## Colors\n`keyboard.colors(String region, String Color);`\n\nColors must be set before using keyboard.blink();\n\nThey will not affect hardware-default modes such as Wave and Breathing.\n\nAll colors supported by [Colors.js](https://github.com/Marak/colors.js) are now supported here\n\nTo set a color use keyboard.colors() There are two ways to set the color to a region:\n```javascript\nkeyboard.color('middle', 'green');\nkeyboard.color('middle', {color:'#ffffff', intensity:'high'});\nkeyboard.color('middle', {color:'#4654BD', intensity:'high'});\n```\n\n\n## Intensity\n`keyboard.colors(String region, {String color, String intensity});`\n\nThe color intensity to white can be set via keyboard.colors();\n\nThe following intensities are used:\n\n    light\n    low\n    med\n    high\n\nTo set it:\n\n```javascript\nkeyboard.color('right', {\n  color: '#1CA626',\n  intensity: 'med',  // light, low, med, high\n});\n```\n\n##Modes\n`keyboard.mode(String mode, String primaryColor, String secondaryColor);`\n`keyboard.mode(String mode, Object left, Object middle, Object right, Integer cyclePeriod);`\n\nMSI Steelseries keyboards have built modes.\n\nBreathe and Wave modes support fading between colors, which can be set when calling the keyboard.mode() method.\n\nPassing in only one color argument defaults the secondaryColor to 'black':\n\n`keyboard.mode(String mode, String primaryColor);`\n\nYou can also set each region's color individually:\n\n`keyboard.mode(String mode, String leftPrimary, String middlePrimary, String rightPrimary, Integer cyclePeriod);`\n\n`keyboard.mode(String mode, Object left, Object middle, Object right, Integer cyclePeriod);`\n\nRegion objects are defined as such:\n\n    right: {\n      primary: {\n        color: 'red',\n        intensity: 'high'\n      },\n      secondary: {\n        color: 'blue',\n        intensity: 'high'\n      }\n    }\n\nWhich is equivalent to:\n\n    right: {\n      color: 'red',\n      intensity: 'high',\n      secondary: {\n        color: 'blue',\n        intensity: 'high'\n      }\n    }\n\n\nYou can also define just the primary and secondary colors, leaving the intensities to their default (high):\n\n    right: {\n      primary: 'red',\n      secondary: 'blue'\n    }\n\nIf you specify the color and intensity directly in the Region object, you can set just one of the secondary fields and the other will take the default from the primary (secondary color will be red with light intensity):\n\n    right: {\n      color: 'red',\n      intensity: 'high',\n      secondary: {intensity:'light'}\n    }\n\nThe cyclePeriod defaults to 2 seconds when not passed in.\n\nThe modes defined by the hardware are:\n\n    Normal\n    Gaming\n    Breathe\n    Demo\n    Wave\n\n\nUsage:\n\n```javascript\n\nkeyboard.mode('breathe', 'green', 'red', 'yellow');\n\n```\n\n\n##Regions\n`keyboard.colors(String region, String color);`\n\nThere are three regions on the Steelseries keyboard:\n\n    Left\n    Middle\n    Right\n\nEach can have a color and intensity set.\n\n\n\n##Blink\n`keyboard.blink(Time milliseconds);`\n\nThe time is the speed in which the keyboard is to blink.\n\nkeyboard.colors(); Must be set before using keyboard.blink();\n\nUsage:\n\n```javascript\n// keyboard.color(...);\n\n\nkeyboard.blink(750);\n```\n\nTo blink one, or two regions only:\n\n```javascript\n// keyboard.color(...);\n\n\nkeyboard.blink(['left','right'], 750);\n```\n\n\n\n## Examples\n\nYou can view more examples in the [example folder.](https://github.com/wearefractal/msi-keyboard/tree/master/examples)\n\n### Confirmed Systems\n\n```sh\nOS: Debain 8\nKernel: Linux 4.4.0 AMD\nNode: v5 / v6\nlibusb-dev: v0.1.12\n\n---\n\nOS: Arch Linux\nKernel: 4.5.1-1-ARCH\nNode: v6.0.0\nlibusb v0.1.12\n\n\n---\n\nOS: Ubuntu 16.04\nKernel: 4.4.14\nNode: v6\nlibusb v0.1.12\n```\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 | Steve Lacy (http://slacy.me)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlacy%2Fmsi-keyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenlacy%2Fmsi-keyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlacy%2Fmsi-keyboard/lists"}