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
+4 -5
View File
@@ -77,14 +77,13 @@ export default class App extends React.Component {
} }
componentDidMount() { componentDidMount() {
this.fetchSources(); Mousetrap.bind(['mod+z'], this.onUndo.bind(this));
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this)); Mousetrap.bind(['mod+y', 'mod+shift+z'], this.onRedo.bind(this));
Mousetrap.bind(['ctrl+y'], this.onRedo.bind(this));
} }
componentWillUnmount() { componentWillUnmount() {
Mousetrap.unbind(['ctrl+z'], this.onUndo.bind(this)); Mousetrap.unbind(['mod+z'], this.onUndo.bind(this));
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this)); Mousetrap.unbind(['mod+y', 'mod+shift+z'], this.onRedo.bind(this));
} }
onReset() { onReset() {