Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
azimgd committed Apr 19, 2023
1 parent 1ec4276 commit 82905db
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,28 @@ npm install react-native-key-command

`cd ios && pod install`

Changes required in your `AppDelegate.m`

```
// add library imports in the top of your file
#import <HardwareShortcuts.h>
@implementation AppDelegate
..
// Add keyCommands and handleKeyCommand methods in AppDelegate class
- (NSArray *)keyCommands {
return [HardwareShortcuts sharedInstance].keyCommands;
}
- (void)handleKeyCommand:(UIKeyCommand *)keyCommand {
[[HardwareShortcuts sharedInstance] handleKeyCommand:keyCommand];
}
@end
```

## Android

Changes required in your `MainActivity.java`
Expand Down

0 comments on commit 82905db

Please sign in to comment.