Merge pull request #95 from kaganjd/16-keyboard-shortcuts

Add keyboard shortcuts for 'run' and 'stop'
This commit is contained in:
Cassie Tarakajian 2016-09-15 13:10:22 -04:00 committed by GitHub
commit bd71041794

View file

@ -123,6 +123,14 @@ class IDEView extends React.Component {
e.preventDefault();
e.stopPropagation();
this.props.saveProject();
} else if (e.key === 'Enter' && e.shiftKey && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
e.preventDefault();
e.stopPropagation();
this.props.stopSketch();
} else if (e.key === 'Enter' && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
e.preventDefault();
e.stopPropagation();
this.props.startSketch();
}
}