{"id":16328472,"url":"https://github.com/amekusa/karabinerge","last_synced_at":"2025-05-08T07:51:53.936Z","repository":{"id":46096913,"uuid":"512493128","full_name":"amekusa/karabinerge","owner":"amekusa","description":"Karabiner Elements complex modifications generator","archived":false,"fork":false,"pushed_at":"2024-07-09T08:02:19.000Z","size":781,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T13:56:38.051Z","etag":null,"topics":["accessibility","karabiner","keyboard","macos","productivity","remap","shortcuts"],"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/amekusa.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}},"created_at":"2022-07-10T17:10:46.000Z","updated_at":"2024-07-09T08:02:23.000Z","dependencies_parsed_at":"2024-03-22T07:37:22.606Z","dependency_job_id":"1117a939-5ba4-407d-8945-ad5c722ea1f1","html_url":"https://github.com/amekusa/karabinerge","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amekusa%2Fkarabinerge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amekusa%2Fkarabinerge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amekusa%2Fkarabinerge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amekusa%2Fkarabinerge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amekusa","download_url":"https://codeload.github.com/amekusa/karabinerge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252470760,"owners_count":21753046,"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":["accessibility","karabiner","keyboard","macos","productivity","remap","shortcuts"],"created_at":"2024-10-10T23:14:20.668Z","updated_at":"2025-05-08T07:51:53.919Z","avatar_url":"https://github.com/amekusa.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# KARABINERGE\n[![NPM Version](https://img.shields.io/npm/v/karabinerge?style=for-the-badge\u0026label=npm%20package)](https://www.npmjs.com/package/karabinerge) [![NPM License](https://img.shields.io/npm/l/karabinerge?style=for-the-badge)](https://github.com/amekusa/karabinerge/blob/trunk/LICENSE)\n\nKarabiner-Elements complex modifications generator\n\n\u003c!--TRUNCATE:START--\u003e\n[📘 Full Documentation](https://amekusa.github.io/karabinerge/latest/index.html)\n\u003c!--TRUNCATE:END--\u003e\n\n\n## What this is\nKarabinerge provides useful functions and classes that help you to **programmatically generate complex modifications** of Karabiner-Elements in a simple and short syntax.\n\nTired of tinkering with JSON by your hand? This is for you.\n\n\n## How to install\n```sh\nnpm i --save karabinerge\n\n# as global package\nnpm i -g karabinerge\n```\n\n## How to use\n```js\n// example.js\nimport {RuleSet, key} from 'karabinerge'; // ES6\nconst {RuleSet, key} = require('karabinerge'); // CJS\n\nlet rules = new RuleSet('My Rules');\n\nrules.add('control + H to backspace')\n  .remap({\n    from: key('h', 'control'),\n    to:   key('delete_or_backspace')\n  });\n\nrules.out(); // output JSON to stdout\n```\n\nRun it on terminal:\n```sh\nnode example.js \u003e example.json\n```\n\nResult (`example.json`):\n```json\n{\n  \"title\": \"My Rules\",\n  \"rules\": [\n    {\n      \"description\": \"control + H to backspace\",\n      \"manipulators\": [\n        {\n          \"type\": \"basic\",\n          \"from\": {\n            \"key_code\": \"h\",\n            \"modifiers\": {\n              \"mandatory\": [\n                \"control\"\n              ]\n            }\n          },\n          \"to\": [\n            {\n              \"key_code\": \"delete_or_backspace\"\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\n## More examples\n```js\nimport {RuleSet, key} from 'karabinerge';\nlet rules = new RuleSet('My Rules');\n\nrules.add('command + H/J/K/L to arrow keys')\n  .remap({\n    from: key('h', 'command'),\n    to:   key('left_arrow')\n  })\n  .remap({\n    from: key('j', 'command'),\n    to:   key('down_arrow')\n  })\n  .remap({\n    from: key('k', 'command'),\n    to:   key('up_arrow')\n  })\n  .remap({\n    from: key('l', 'command'),\n    to:   key('right_arrow')\n  });\n\nrules.out();\n```\n\nResult:\n```json\n{\n  \"title\": \"My Rules\",\n  \"rules\": [\n    {\n      \"description\": \"command + H/J/K/L to arrow keys\",\n      \"manipulators\": [\n        {\n          \"type\": \"basic\",\n          \"from\": {\n            \"key_code\": \"h\",\n            \"modifiers\": {\n              \"mandatory\": [\n                \"command\"\n              ]\n            }\n          },\n          \"to\": [\n            {\n              \"key_code\": \"left_arrow\"\n            }\n          ]\n        },\n        {\n          \"type\": \"basic\",\n          \"from\": {\n            \"key_code\": \"j\",\n            \"modifiers\": {\n              \"mandatory\": [\n                \"command\"\n              ]\n            }\n          },\n          \"to\": [\n            {\n              \"key_code\": \"down_arrow\"\n            }\n          ]\n        },\n        {\n          \"type\": \"basic\",\n          \"from\": {\n            \"key_code\": \"k\",\n            \"modifiers\": {\n              \"mandatory\": [\n                \"command\"\n              ]\n            }\n          },\n          \"to\": [\n            {\n              \"key_code\": \"up_arrow\"\n            }\n          ]\n        },\n        {\n          \"type\": \"basic\",\n          \"from\": {\n            \"key_code\": \"l\",\n            \"modifiers\": {\n              \"mandatory\": [\n                \"command\"\n              ]\n            }\n          },\n          \"to\": [\n            {\n              \"key_code\": \"right_arrow\"\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Real life examples\n- [Keycomfort](https://github.com/amekusa/keycomfort)\n- [Mighty Thumb](https://github.com/amekusa/mighty-thumb/blob/master/karabiner-elements/mighty-thumb.js)\n\n\u003c!--TRUNCATE:START--\u003e\n## More details\nSee: [📘 Full Documentation](https://amekusa.github.io/karabinerge/latest/index.html)\n\n\n---\nKarabinerge \u0026copy; 2022 Satoshi Soma ([amekusa.com](https://amekusa.com))\nLicensed under the MIT license\n\u003c!--TRUNCATE:END--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famekusa%2Fkarabinerge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famekusa%2Fkarabinerge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famekusa%2Fkarabinerge/lists"}