From d55fb643e6cbfea78ade3680c2d835d2e990c8c3 Mon Sep 17 00:00:00 2001 From: Jen Kagan Date: Wed, 14 Sep 2016 00:10:01 -0400 Subject: [PATCH] Add keyboard shortcuts for 'run' and 'stop' - Fixes #16. --- client/modules/IDE/pages/IDEView.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/modules/IDE/pages/IDEView.js b/client/modules/IDE/pages/IDEView.js index d0aa17ae..af9674de 100644 --- a/client/modules/IDE/pages/IDEView.js +++ b/client/modules/IDE/pages/IDEView.js @@ -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(); } }