{"id":21003281,"url":"https://github.com/koding/keyconfig","last_synced_at":"2025-05-15T00:31:51.840Z","repository":{"id":28207034,"uuid":"31710615","full_name":"koding/keyconfig","owner":"koding","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-14T21:17:37.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-11T21:31:58.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","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/koding.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2015-03-05T11:23:18.000Z","updated_at":"2016-11-29T07:36:04.000Z","dependencies_parsed_at":"2022-08-02T17:00:13.847Z","dependency_job_id":null,"html_url":"https://github.com/koding/keyconfig","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koding%2Fkeyconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koding%2Fkeyconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koding%2Fkeyconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koding%2Fkeyconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koding","download_url":"https://codeload.github.com/koding/keyconfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224982976,"owners_count":17402423,"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":[],"created_at":"2024-11-19T08:24:36.714Z","updated_at":"2024-11-19T08:24:37.374Z","avatar_url":"https://github.com/koding.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keyconfig\n\nstores keyboard shortcut definitions.\n\n# usage\n\n```js\nvar keyconfig = new Keyconfig({\n  x: [ \n    { \n      name: 'foo', \n      binding: [ [ 'ctrl+z' ], [ 'command+z' ] ]\n    } \n  ]\n});\n\nkeyconfig\n  .on('change', function (collection, model) { });\n  .find({ name: 'x '})\n  .find({ name: 'foo' })\n  .update({ binding: ['command+d'] });\n```\n\n# spec\n\nBelow is an example of a collection:\n\n```json\n{\n  \"editor\":\n  [\n    {\n      \"name\": \"save\",\n      \"description\": \"Save\",\n      \"binding\": [\n        [ \"ctrl+s\" ],\n        [ \"command+s\" ]\n      ],\n      \"options\": {\n        \"enabled\": true\n      }\n    }\n  ]\n}\n```\n\n### fields\n\n- `name` must be unique\n- `binding` is an array of two arrays that defines win and mac shortcuts respectively\n- `description` is description text\n- `options` is always extended when you do `update`\n\n# api\n\n# keyconfig(collections={})\n\n# Collection(name, models=[])\n\n## .add(model)\n## .update(name, value={}, silent=false)\n## .toJSON()\n## .getCollidingWin()\n## .getCollidingMac()\n\n`Keyconfig` and `Collection` instances also proxy underscore methods.\n\n# Model(value={})\n\n## .update(value={}, silent=false)\n## .getWinKeys()\n## .getMacKeys()\n## .getWinChecksum()\n## .getMacChecksum()\n## .toJSON()\n\nUpdating a model triggers a `change` event that bubble up.\n\n# license\n\nmit","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoding%2Fkeyconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoding%2Fkeyconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoding%2Fkeyconfig/lists"}