Skip to content

Commit

Permalink
removed shortcuts section in favour of 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin42 authored Jul 17, 2017
1 parent de01925 commit 8e5af41
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,63 +190,6 @@ Let's take an another example -
<img src="https://i.gyazo.com/ef2427464989b1ce14bc44bb4fc94689.gif" />
</p>

### Keyboard shortcuts
You can define keyboard shortcuts. They have to be grouped by os. The three available are
`win`, `darwin`, and `linux`. You can group multiple os by a `,` for example if the
shortcut was for all platforms `win,darwin,linux` would be fine as a key

```jsx
<Terminal
shortcuts={{
'darwin,win,linux': {
'ctrl + a': 'echo whoo',
},
}}
/>
```

But you might want to specific

```jsx
<Terminal
shortcuts={{
'win': {
'ctrl + a': 'echo hi windows',
},
'darwin': {
'cmd + a': 'echo hi mac'
},
'linux': {
'ctrl + a': 'echo hi linux'
}
}}
/>
```

You can mix and match

```jsx
<Terminal
shortcuts={{
'win,linux': {
'ctrl + b': 'echo we are special',
},
'win': {
'ctrl + a': 'echo hi windows',
},
'darwin': {
'cmd + a': 'echo hi mac'
},
'linux': {
'ctrl + a': 'echo hi linux'
}
}}
/>
```

The value of the shortcut should be a command to run.


### Using plugins 🔥

We have also developed a plugin system for the `<Terminal />` component which helps you develop custom plugins. Here is one example of plugin which creates a fake file system called [terminal-in-react-pseudo-file-system-plugin](https://github.com/jcgertig/terminal-in-react-pseudo-file-system-plugin).
Expand Down

0 comments on commit 8e5af41

Please sign in to comment.