{"id":17474175,"url":"https://github.com/ghostffcode/keybinder","last_synced_at":"2025-03-28T10:45:27.087Z","repository":{"id":81390176,"uuid":"68759308","full_name":"ghostffcode/keybinder","owner":"ghostffcode","description":":key: Simple Javascript Keybinder","archived":false,"fork":false,"pushed_at":"2016-11-10T04:59:50.000Z","size":161,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-18T20:48:34.437Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ghostffcode.github.io/keybinder/","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/ghostffcode.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":"2016-09-20T22:44:36.000Z","updated_at":"2016-12-30T20:58:23.000Z","dependencies_parsed_at":"2023-06-11T01:30:12.007Z","dependency_job_id":null,"html_url":"https://github.com/ghostffcode/keybinder","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"84cce25e152288812c78ef2ff08e6a56e329d0ff"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostffcode%2Fkeybinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostffcode%2Fkeybinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostffcode%2Fkeybinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostffcode%2Fkeybinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostffcode","download_url":"https://codeload.github.com/ghostffcode/keybinder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246015096,"owners_count":20709924,"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-10-18T18:08:38.658Z","updated_at":"2025-03-28T10:45:27.065Z","avatar_url":"https://github.com/ghostffcode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keybinder - Simple Javascript Keybinder\n\n---\n## Installation\n```\nnpm i keybinder --save\n```\n\n## To Use\n```javascript\nkeybinder(selector, keys, callback);\n```\nThe arguments for the keybinder are:\n* __Selector (String)__: The DOM selector for elements that you want to bind the keys to.\n\n* __keys (Array)__: Array of key combinations to listen to.\n\n* __callback (function)__: The callback function to run when the specified key combinations are pressed. This is automatically bound to the element selected.\n\n## Implement\nIn node, require:\n```javascript\nconst keybinder = require(\"keybinder\");\n```\n\nOr in HTML use:\n```html\n\u003cinput type=\"text\" class=\"name\" /\u003e\n\u003cscript src=\"path/to/keybinder.js\" charset=\"utf-8\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    keybinder('.name', ['control', 's'], function () {\n      // this refers to element with .name as class\n      this.value = 'I am changed';\n    });\n\u003c/script\u003e\n```\n\n## Contributing\nIs there something you think it is missing? Great!\n- Fork this repo\n- Make changes, write tests\n- Send a pull request\n\n### License\nKeybinder is licensed under the [MIT License](../master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostffcode%2Fkeybinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostffcode%2Fkeybinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostffcode%2Fkeybinder/lists"}