{"id":23288648,"url":"https://github.com/mytecor/hotkeys","last_synced_at":"2025-10-06T08:53:30.953Z","repository":{"id":57266831,"uuid":"161211351","full_name":"mytecor/hotkeys","owner":"mytecor","description":"Simple lightweight JS keyboard hotkeys library","archived":false,"fork":false,"pushed_at":"2020-12-10T23:13:37.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T13:36:03.105Z","etag":null,"topics":["hotkeys","shortcuts"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mytecor.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":"2018-12-10T17:25:41.000Z","updated_at":"2022-09-02T19:39:21.000Z","dependencies_parsed_at":"2022-08-25T03:41:15.372Z","dependency_job_id":null,"html_url":"https://github.com/mytecor/hotkeys","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/mytecor%2Fhotkeys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytecor%2Fhotkeys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytecor%2Fhotkeys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytecor%2Fhotkeys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mytecor","download_url":"https://codeload.github.com/mytecor/hotkeys/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247517654,"owners_count":20951710,"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":["hotkeys","shortcuts"],"created_at":"2024-12-20T03:32:05.881Z","updated_at":"2025-10-06T08:53:25.897Z","avatar_url":"https://github.com/mytecor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hotkeys-nano\nSimple lightweight JS keyboard hotkeys library\n\n## Installation\n```\nyarn add hotkeys-nano\n```\nor\n```\nnpm install hotkeys-nano\n```\n\n### Configure\n```js\nHotkeys.configure()\n```\nLook at the console\n\n## Usage\n```js\nimport Hotkeys from 'hotkeys-nano'\n\nlet hotkeys = new Hotkeys\n\nhotkeys.set('ControlLeft+KeyS', e =\u003e {\n\te.preventDefault()\n\tconsole.log('Saved')\n})\n\nhotkeys.set('ControlLeft+ShiftLeft+KeyZ, ControlLeft+KeyY', e =\u003e {\n\tconsole.log('Ctrl+Y')\n})\n\nhotkeys.start()\n```\n\n### Create hotkeys listener\n```js\nlet hotkeys = new Hotkeys(target: Node)\n```\n\nThe Hotkeys object implements the standart js Map object\n\u003cbr\u003eand it adds the following methods:\n\n### Start listening\n```js\nhotkeys.start()\n```\n\n### Set new hotkey\n```js\nhotkeys.set(hotkeys: String|Array, callback: Function)\n```\n###### Example\n```js\nhotkeys.set('AltLeft+ArrowRight', e =\u003e {\n\tconsole.log(e)\n})\n```\n\n### Delete hotkey\n```js\nhotkeys.delete(hotkeys: String|Array)\n```\n###### Example\n```js\nhotkeys.delete('AltLeft+ArrowRight')\n```\n\n### Stop listening\n```js\nhotkeys.stop()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmytecor%2Fhotkeys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmytecor%2Fhotkeys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmytecor%2Fhotkeys/lists"}