Merge pull request #1 from ziveo/develop__mac-keyboard-bindings

Adding mac keyboard bindings
This commit is contained in:
ziveo 2018-03-15 23:41:48 -04:00 committed by GitHub
commit 8e02722b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,12 +76,16 @@ export default class App extends React.Component {
componentDidMount() {
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this));
Mousetrap.bind(['command+z'], this.onUndo.bind(this));
Mousetrap.bind(['ctrl+y'], this.onRedo.bind(this));
Mousetrap.bind(['command+shift+z'], this.onRedo.bind(this));
}
componentWillUnmount() {
Mousetrap.unbind(['ctrl+z'], this.onUndo.bind(this));
Mousetrap.unbind(['command+z'], this.onUndo.bind(this));
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this));
Mousetrap.unbind(['command+shift+z'], this.onRedo.bind(this));
}
onReset() {