Adding mac keyboard bindings

This commit is contained in:
Bojan Zivkovic 2018-03-15 23:39:32 -04:00
parent 0555fc48ad
commit 984581e01a

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