{"id":31923051,"url":"https://github.com/rocketchat/react-native-keycommands","last_synced_at":"2025-10-13T23:43:44.659Z","repository":{"id":47098096,"uuid":"220007527","full_name":"RocketChat/react-native-keycommands","owner":"RocketChat","description":"UIKeyCommands wrapper to React-Native.","archived":false,"fork":false,"pushed_at":"2021-09-13T16:53:29.000Z","size":13,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-12T05:52:08.219Z","etag":null,"topics":["key-commands","react-native","uikeycommand"],"latest_commit_sha":null,"homepage":null,"language":"Objective-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/RocketChat.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":"2019-11-06T13:50:15.000Z","updated_at":"2023-07-23T18:36:17.000Z","dependencies_parsed_at":"2022-09-18T04:10:32.403Z","dependency_job_id":null,"html_url":"https://github.com/RocketChat/react-native-keycommands","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RocketChat/react-native-keycommands","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Freact-native-keycommands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Freact-native-keycommands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Freact-native-keycommands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Freact-native-keycommands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RocketChat","download_url":"https://codeload.github.com/RocketChat/react-native-keycommands/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Freact-native-keycommands/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017232,"owners_count":26086016,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["key-commands","react-native","uikeycommand"],"created_at":"2025-10-13T23:43:37.748Z","updated_at":"2025-10-13T23:43:44.655Z","avatar_url":"https://github.com/RocketChat.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-keycommands\n\nUse `UIKeyCommands` (iOS).\n\n## Getting started\n\n`$ npm install react-native-keycommands --save`\n\n### Mostly automatic installation (RN \u003c 0.60)\n\n`$ react-native link react-native-keycommands`\n\n### Manual installation (RN \u003c 0.60)\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `react-native-keycommands` and add `KeyCommands.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libKeyCommands.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)\u003c\n\n#### Android\n\nNot need setup.\n\n## Usage\n```javascript\nimport React from 'react';\nimport KeyCommands, { constants } from 'react-native-keycommands';\n\nconst keyCommands = [\n\t{\n\t\tinput: 'a',\n\t\tmodifierFlags: 0, // without flags\n\t\tdiscoverabilityTitle: 'a pressed'\n  },\n  {\n\t\tinput: 'a',\n\t\tmodifierFlags: constants.keyModifierCommand,\n\t\tdiscoverabilityTitle: 'CMD + a pressed'\n  },\n  {\n\t\tinput: 'a',\n\t\tmodifierFlags: constants.keyModifierCommand | constants.keyModifierAlternate,\n\t\tdiscoverabilityTitle: 'CMD + ALTERNATE + a pressed'\n  }\n];\n\nexport default class App extends React.Component {\n  onKeyCommand = ({ nativeEvent }) =\u003e {\n\t\tconsole.log('event: ', nativeEvent);\n  };\n  \n  render() {\n    \u003cKeyCommands\n      style={{ flex: 1 }}\n      keyCommands={keyCommands}\n      onKeyCommand={this.onKeyCommand}\n    /\u003e\n  }\n};\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketchat%2Freact-native-keycommands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocketchat%2Freact-native-keycommands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketchat%2Freact-native-keycommands/lists"}