{"id":15297308,"url":"https://github.com/jonnyc0g/roccat-led","last_synced_at":"2026-01-19T07:32:49.403Z","repository":{"id":45957664,"uuid":"430127931","full_name":"JonnyC0G/roccat-led","owner":"JonnyC0G","description":"With this Node Module you can control your ROCCAT devices. Bring your setup to life!","archived":false,"fork":false,"pushed_at":"2021-12-28T15:27:49.000Z","size":50,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:46:29.246Z","etag":null,"topics":["aimo","api","hid","js","kone","led","node","rgb","roccat","sense","vulcan"],"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/JonnyC0G.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":"2021-11-20T14:41:52.000Z","updated_at":"2024-08-18T22:22:48.000Z","dependencies_parsed_at":"2022-08-24T01:50:30.779Z","dependency_job_id":null,"html_url":"https://github.com/JonnyC0G/roccat-led","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnyC0G%2Froccat-led","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnyC0G%2Froccat-led/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnyC0G%2Froccat-led/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnyC0G%2Froccat-led/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonnyC0G","download_url":"https://codeload.github.com/JonnyC0G/roccat-led/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247446975,"owners_count":20940228,"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":["aimo","api","hid","js","kone","led","node","rgb","roccat","sense","vulcan"],"created_at":"2024-09-30T19:16:35.137Z","updated_at":"2026-01-19T07:32:49.397Z","avatar_url":"https://github.com/JonnyC0G.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `roccat-led` is an extended version of [`roccatvulcan`](https://github.com/simonhuwiler/roccatvulcan) by Simon Huwiler\nWith this Node Module you can control your ROCCAT devices. Bring your setup to life!\n\n## Background\nThis module was inspired by the npm package `roccatvulcan` created by Simon Huwiler.\n[Link](https://github.com/simonhuwiler/roccatvulcan) to his repo, check out his amazing work.\n\u003cbr\u003eThis module not only supports *Vulcan AIMO* keyboards, but also *Sense AIMO* mousepads and *Kone AIMO* mouse. If you want to integrate even more devices feel free to contribute!\n\n## Versions\n### `0.2.8`\nAdded color types for safer use\n```javascript\nlet color = new HexColor(\"#00ff00\");\nmousepad.fillAll(color);\n```\nAdded animation for sense and kone\n\n### `0.2.6`\nAdded typescript definitions\n\n### `0.2.1`\ninitial release\n\n## Installation\nInstall per npm  \n`npm install roccat-led`  \nor clone repository  \n`git clone git@github.com:jonnyc0g/roccat-led.git`\n\n## Usage\n**Important**:\n- Set you Sense-Illumination Mode to \"Custom\"\n- Close your Roccat Swarm App (right click -\u003e close)\n```javascript\n//Load module\nimport { RoccatKone, RoccatSense, RoccatVulcan } from \"roccat-led/dist/index.js\";\n\nlet mouse = new RoccatKone({\n        ready: () =\u003e {\n            mouse.fillAll(\"#00ff00\"); // mouse.fillAll(new HexCode(\"#00ff00\") since module version 0.2.8\n            mouse.render();\n        }\n    }\n);\n\nlet mousepad = new RoccatSense({\n        ready: () =\u003e {\n            mousepad.fillAll(\"#00ff00\");\n            mousepad.render();\n        }\n    }\n);\n\nlet keyboard = new RoccatVulcan({\n        layout: 'de-de',\n        ready: () =\u003e {\n            keyboard.fillAll(\"#00ff00\");\n            keyboard.render();\n        }\n    }\n)\n```\n\n## Init Parameters\n`productId` (optional)  \nThe Api will search automatically for your device. Although it may be possible, that your devices version is unknown. Then you need to provide a productId. If the device is not found, you will see all possible devices in your terminal. Copy the Id of the corresponding one.\n\n`ready` (optional)  \nCallback after device is initialised.\n\n## Interaction-Methods\n### General\n\n#### Setting color\n```javascript\nfillAll(color);\n```\nWill colorize the device. **Be aware**: Only hex-colors are supported. No `blue` or `black`. Since version `0.2.8` only HexCode-Objects\n\nWhen ever you change the colors of a key, the api will store every key in the memory. The api will not send the new colors to the keyboard by itself, you need to **render** the current state. Two methods will help you:\n#### Single rendering\n```javascript\nmousepad.render()\n```\nThis will send all the current colors to the keyboard\n#### Auto rendering\n```javascript\nmousepad.renderStart(50);\n```\nThis will start continous rendering every 50 millisecond.\n\n```javascript\nmousepad.renderStop();\n```\nStops the auto renderer.\n\n### For ROCCAT Sense AIMO\n\u003cdetails\u003e\n\nSense contains 2 seperated LED, they can be set using\u003cbr\u003e\n**setColor(index, color)**\n```javascript\n// index can be 0-1: left, right\nsetColor(index, color);\n```\n\u003c/details\u003e\n\n### For ROCCAT Kone AIMO\n\u003cdetails\u003e\n\nKone contains 11 seperated LED, they can be set using\u003cbr\u003e\n**setColor(index, color)**\n```javascript\n// index can be 0-10: wheel, inside-left (4 times), inside-right (4 times), outside-left, outside-right\nsetColor(index, color);\n```\n\u003c/details\u003e\n\n### For ROCCAT Vulcan AIMO\n\u003cdetails\u003e\n\n**Update Keys**\n```javascript\nupdateKey(key, colors)\nupdateKey(key, colors, backgroundColor)\n```\nWill only update the given keys, all other keys will remain the same. Except: `backgroundColor` is given!  \nParams:\n* `keys`: List of Keys\n* `color`: New color in hex\n* `backgroundColor`: optional. Changes the color of all other keys\n\n\n```javascript\n// Example\nkeyboard.updateKeys(['W', 'A', 'S' ,'D'], '#ff0000')\n```\n**Update Key**\n```javascript\nupdateKey(key, colors)\nupdateKey(key, colors, backgroundColor)\n```\nSame as `updateKeys` but takes only one key.\n```javascript\n// Example\nkeyboard.updateKeys('W', '#ff0000')\n```\n\n**Animate Keys**\n```javascript\nanimateKeys(keys, colorFrom, colorTo, duration)\n```\nCreates a transition between two colors. Be aware: Auto Rendering needs to be running!  \nParams:\n* `keys`: List of Keys to animate\n* `colorFrom`: Start color\n* `colorTo`: End Color\n* `duration`: Duration in Miliseconds\n\n```javascript\n// Example\nkeyboard.animateKeys(['W', 'A', 'S', 'D'], '#000000', '#ff0000', 1000);\n```\n\n**Animate Key**\n```javascript\nanimateKey(key, colorFrom, colorTo, duration)\n```\nSame as above with single key\n```javascript\n// Example\nkeyboard.animateKeys('W', '#000000', '#ff0000', 1000);\n```\n\n**Write Text (Experimental!)**\n```javascript\nwrite(text, color, keyOffset)\n```\nWrites given Text on the keyboard. **Only a few keys are currently supported! Have a look at**\n[vulcan/keyboardlayout/ch-de/alphabet.js](./src/vulcan/keyboardlayout/ch-de/alphabet.js)\n```javascript\n// Example\nkeyboard.write(\"ANNA\", '#ff0000', 20)\n```\n\n**Marquee (Experimental!)**\n```javascript\nmarquee(text, color, speed)\n```\n\nWrites text the same way as `write` but let the text scroll over the keyboard. Like the old HTML-Tag `marquee`. **Only a few keys are currently supported! Have a look at** [vulcan/keyboardlayout/ch-de/alphabet.js](./src/vulcan/keyboardlayout/ch-de/alphabet.js)\n```javascript\n// Example\nkeyboard.marquee(\"ANNA\", '#ff0000', 200);\n```\n\n## AnimationQueue\nYou can queue animations and run them at will. Use the AnimationQueue for that purpose.\n\n### Add Animation to Queue\n```javascript\nkeyboard.animationQueueAdd(animation, timeout);\n```\nParams:\n* `animation`: Function which will be triggered.\n* `timeout`: After how many milliseconds **after the last animation** this animation should be triggered\n\n### Start Animation Queue\n```javascript\nkeyboard.animationQueueStart(onFinish)\n```\nStarts the Animation Queue and will trigger `onFinish` after all animations have finished\n\n### Stop and Clear Animation Queue\n```javascript\nkeyboard.animationQueueStop()\n```\n\n### Example\nThis will change the colors of the Keys AWSD.\n```javascript\nkeyboard.animationQueueAdd(() =\u003e this.keyboard.animateKeys(['W', 'A', 'S', 'D'], '#000000', '#ffcc00', 2000), 0);\nkeyboard.animationQueueAdd(() =\u003e this.keyboard.animateKeys(['W', 'A', 'S', 'D'], '#ffcc00', '#3224ee', 2000), 2000);\nkeyboard.animationQueueAdd(() =\u003e this.keyboard.animateKeys(['W', 'A', 'S', 'D'], '#3224ee', '#d324ee', 2000), 2000);\nkeyboard.animationQueueAdd(() =\u003e this.keyboard.animateKeys(['W', 'A', 'S', 'D'], '#d324ee', '#55bc18', 2000), 2000);\nkeyboard.animationQueueStart();\n```\n\n## Get Key Pressed event\nTo get the key press event, you can bind an event to the `onData` option on initialisation:\n```javascript\n//Init Keyboard\nkeyboard = new RoccatVulcan({\n  productId: 12440,\n  layout: 'ch-de',\n  onData: data =\u003e {\n    console.log(\"Key\", data.key);\n    console.log(\"State\", data.state);\n  }\n});\n```\nThe data parameter is an object with two states:\n* `key`: The key pressed\n* `state`: The state: 1 = pressed, 0 = released\n\n\n## Turn of a Key\nTo turn of a key, you need to send the color (#000000) black to the keyboard.\n```javascript\nkeyboard.fillAll('#000000');\n```\n\n## Grid\nSometimes you want to access your key by its position on the keyboard, instead of its value. Use the `grid` where each key is in a cell.\n```javascript\nvar grid = keyboard.getGrid();\n```  \nReturns a multi array. Have a look at the file [src/vulcan/keyboardlayout/ch-de/grid.js](./src/vulcan/keyboardlayout/ch-de/grid.js)\n\nTo change the color of the first row (`ESC, F1, F2`...) use it this way:\n```javascript\nvar grid = keyboard.getGrid();\nkeyboard.animateKeys(grid[0], '#000000', '#ff0000', 1000)\n```\n\n\u003c/details\u003e\n\n## Projects made with this library\n* you could be the first!\n* \nWrite me to be listed here!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonnyc0g%2Froccat-led","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonnyc0g%2Froccat-led","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonnyc0g%2Froccat-led/lists"}