From 984581e01a5fe3dd2f3da3ca06c1eca17dc0704b Mon Sep 17 00:00:00 2001 From: Bojan Zivkovic Date: Thu, 15 Mar 2018 23:39:32 -0400 Subject: [PATCH] Adding mac keyboard bindings --- src/components/App.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/App.jsx b/src/components/App.jsx index ba10485..da45152 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -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() {