{"id":18299894,"url":"https://github.com/gamestdio/keycode","last_synced_at":"2025-04-05T13:35:24.613Z","repository":{"id":57113029,"uuid":"42958295","full_name":"gamestdio/keycode","owner":"gamestdio","description":"Use human key names instead of keycode numbers for your keyboard bindings.","archived":false,"fork":false,"pushed_at":"2017-10-16T13:45:51.000Z","size":15,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T23:13:44.436Z","etag":null,"topics":["keycode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/gamestdio.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":"2015-09-22T20:14:07.000Z","updated_at":"2025-01-31T16:07:03.000Z","dependencies_parsed_at":"2022-08-21T23:30:27.539Z","dependency_job_id":null,"html_url":"https://github.com/gamestdio/keycode","commit_stats":null,"previous_names":["gamestdio/keycode.js"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fkeycode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fkeycode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fkeycode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fkeycode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gamestdio","download_url":"https://codeload.github.com/gamestdio/keycode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247342653,"owners_count":20923637,"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":["keycode"],"created_at":"2024-11-05T15:10:39.236Z","updated_at":"2025-04-05T13:35:24.349Z","avatar_url":"https://github.com/gamestdio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @gamestdio/keycode\n\nUse human key names instead of keycode numbers for your keyboard bindings.\n\n**1.7kb minified**\n\n## Warning\n\nThe [`which`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which) and [`keyCode`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode) properties are in the process of being deprecated by the browsers.\n\nAfter mainstream adoption, you would rather use the new [`key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) or [`code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code) attributes in `KeyboardEvent`.\n\nBy the time of this writing, IE/Edge still doesn't support the new `KeyboardEvent.key` / `KeyboardEvent.code` API. See: https://caniuse.com/#feat=keyboardevent-code\n\n## Usage example\n\n```typescript\nimport * as Keycode from \"@gamestdio/keycode\";\n\ndocument.addEventListener('keyup', function(e) {\n  if (e.which == Keycode.ENTER) {\n    console.log(\"User pressed ENTER key\")\n  }\n})\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamestdio%2Fkeycode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamestdio%2Fkeycode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamestdio%2Fkeycode/lists"}