Merge pull request #271 from ziveo/master

Adding mac keyboard bindings
This commit is contained in:
Orange Mug 2018-04-09 09:37:32 +01:00 committed by GitHub
commit 6d094a8b3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {