{"id":22957331,"url":"https://github.com/daylilyfield/hotcakey","last_synced_at":"2025-07-14T02:37:04.155Z","repository":{"id":46392297,"uuid":"410248281","full_name":"daylilyfield/hotcakey","owner":"daylilyfield","description":"the cross-platform global shortcut (aka hotkey) module for node.js and electron","archived":false,"fork":false,"pushed_at":"2021-11-03T09:38:37.000Z","size":544,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T13:18:53.263Z","etag":null,"topics":["electron","global-shortcuts","hotkey","keyboard","nodejs","shortcut"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daylilyfield.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-25T10:57:04.000Z","updated_at":"2022-06-20T14:00:38.000Z","dependencies_parsed_at":"2022-08-30T05:41:44.947Z","dependency_job_id":null,"html_url":"https://github.com/daylilyfield/hotcakey","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/daylilyfield/hotcakey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daylilyfield%2Fhotcakey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daylilyfield%2Fhotcakey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daylilyfield%2Fhotcakey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daylilyfield%2Fhotcakey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daylilyfield","download_url":"https://codeload.github.com/daylilyfield/hotcakey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daylilyfield%2Fhotcakey/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265233753,"owners_count":23731825,"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":["electron","global-shortcuts","hotkey","keyboard","nodejs","shortcut"],"created_at":"2024-12-14T17:16:17.273Z","updated_at":"2025-07-14T02:37:04.132Z","avatar_url":"https://github.com/daylilyfield.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🥞 hotcakey 🥞\n\nhotcaKey is the global shortcut (aka hotkey) module for node.js and electron.\n\nhotcakey is now actively under deploment, so api may have breaking changes even in a short term.\n\n## motivation\n\ni need to detect global shortcut `keydown` and `keyup` events on electron platform. i found a few solution such as [iohook](https://github.com/wilix-team/iohook/). iohook is the excellent module but too powerfull for me. i want to know only key events which has the predetermined combination.\n\n## feature\n\n- detecting key combination globally even if your application does not have a focus.\n- using [web-standard physical keycodes](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values)\n- working with node.js and electron.\n- working on macOS, windows. (and linux for near future)\n\n## install\n\n```sh\nnpm i hotcakey\n```\n\nif you use hotcakey with electron, you may need to run [electron-rebuild](https://github.com/electron/electron-rebuild).\n\n## usage\n\n```typescript\nimport hotcakey from 'hotcakey'\n\nasync function main() {\n  await hotcakey.activate()\n\n  hotcakey.register(['Shift', 'Space'], (event) =\u003e {\n    console.log('%s event at %d', event.type, event.time)\n  })\n}\n\nmain()\n```\n\n## examples\n\nplease check out the [./examples](./examples) directory. you can find some examples for [node.js](./examples/node) and [electron](./examples/electron) there. if you would like to run examples on your computer, please clone this repository, open your terminal, and then input the commands below.\n\n```sh\n# run node.js example\nnpm run examples:node\n\n# run electron example\nnpm run examples:electron\n```\n\n## available physical keycodes\n\nhotcakey uses physical keycodes defiend in web standard. see type definitions [here](./src/index.ts) for detail.\n\n## supported os\n\n- [x] macOS 10.7 or higher\n- [x] windows 10 or higher\n- [ ] linux\n\n## supported platform\n\n- [x] node.js 14.14 or higher\n- [x] electron 14 or higher\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaylilyfield%2Fhotcakey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaylilyfield%2Fhotcakey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaylilyfield%2Fhotcakey/lists"}