diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx
index 32b68dde..0a8b29a7 100644
--- a/client/components/Nav.jsx
+++ b/client/components/Nav.jsx
@@ -275,6 +275,26 @@ class Nav extends React.PureComponent {
{'\u21E7'}+{metaKeyName}+Enter
+
+
+
+
+
+
@@ -432,7 +452,8 @@ Nav.propTypes = {
findPrev: PropTypes.func
}),
startSketch: PropTypes.func.isRequired,
- stopSketch: PropTypes.func.isRequired
+ stopSketch: PropTypes.func.isRequired,
+ setAllAccessibleOutput: PropTypes.func.isRequired
};
Nav.defaultProps = {
diff --git a/client/modules/IDE/actions/preferences.js b/client/modules/IDE/actions/preferences.js
index 4f735280..46182fa5 100644
--- a/client/modules/IDE/actions/preferences.js
+++ b/client/modules/IDE/actions/preferences.js
@@ -216,3 +216,12 @@ export function setAutorefresh(value) {
}
};
}
+
+export function setAllAccessibleOutput(value) {
+ return (dispatch) => {
+ dispatch(setTextOutput(value));
+ dispatch(setGridOutput(value));
+ dispatch(setSoundOutput(value));
+ };
+}
+
diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx
index 1a360ae1..6600711b 100644
--- a/client/modules/IDE/pages/IDEView.jsx
+++ b/client/modules/IDE/pages/IDEView.jsx
@@ -166,16 +166,14 @@ class IDEView extends React.Component {
e.preventDefault();
e.stopPropagation();
this.props.startSketch();
+ // 50 === 2
} else if (e.keyCode === 50 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac)) && e.shiftKey) {
e.preventDefault();
- this.props.setTextOutput(false);
- this.props.setGridOutput(false);
- this.props.setSoundOutput(false);
+ this.props.setAllAccessibleOutput(false);
+ // 49 === 1
} else if (e.keyCode === 49 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac)) && e.shiftKey) {
e.preventDefault();
- this.props.setTextOutput(true);
- this.props.setGridOutput(true);
- this.props.setSoundOutput(true);
+ this.props.setAllAccessibleOutput(true);
}
}
@@ -220,6 +218,7 @@ class IDEView extends React.Component {
warnIfUnsavedChanges={this.warnIfUnsavedChanges}
showKeyboardShortcutModal={this.props.showKeyboardShortcutModal}
cmController={this.cmController}
+ setAllAccessibleOutput={this.props.setAllAccessibleOutput}
/>