Skip to content

Commit

Permalink
Merge pull request #271 from ziveo/master
Browse files Browse the repository at this point in the history
Adding mac keyboard bindings
  • Loading branch information
orangemug authored Apr 9, 2018
2 parents a589f89 + ad83f94 commit 6d094a8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@ export default class App extends React.Component {
}

componentDidMount() {
this.fetchSources();
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this));
Mousetrap.bind(['ctrl+y'], this.onRedo.bind(this));
Mousetrap.bind(['mod+z'], this.onUndo.bind(this));
Mousetrap.bind(['mod+y', 'mod+shift+z'], this.onRedo.bind(this));
}

componentWillUnmount() {
Mousetrap.unbind(['ctrl+z'], this.onUndo.bind(this));
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this));
Mousetrap.unbind(['mod+z'], this.onUndo.bind(this));
Mousetrap.unbind(['mod+y', 'mod+shift+z'], this.onRedo.bind(this));
}

onReset() {
Expand Down

0 comments on commit 6d094a8

Please sign in to comment.