From d666d17e9c6f507cded5842dd47c1b807d4ad376 Mon Sep 17 00:00:00 2001 From: shakti97 Date: Tue, 25 Feb 2020 01:13:57 +0530 Subject: [PATCH 1/2] Added Shortcut Toggle Console --- client/modules/IDE/pages/IDEView.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index cd5813d2..39809d4b 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -163,6 +163,13 @@ class IDEView extends React.Component { } else { this.props.collapseSidebar(); } + } else if (e.keyCode === 192 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) { + e.preventDefault(); + if (this.props.ide.consoleIsExpanded) { + this.props.collapseConsole(); + } else { + this.props.expandConsole(); + } } } From 0f8b489af24fbc66a686f329056e5a3c753a2697 Mon Sep 17 00:00:00 2001 From: shakti97 Date: Sun, 5 Apr 2020 13:46:07 +0530 Subject: [PATCH 2/2] added toggle console keyboard shortcut to keyboard shortcut overlay --- client/modules/IDE/components/KeyboardShortcutModal.jsx | 6 ++++++ client/modules/IDE/pages/IDEView.jsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/components/KeyboardShortcutModal.jsx b/client/modules/IDE/components/KeyboardShortcutModal.jsx index 7a8e8b58..420a99c6 100644 --- a/client/modules/IDE/components/KeyboardShortcutModal.jsx +++ b/client/modules/IDE/components/KeyboardShortcutModal.jsx @@ -80,6 +80,12 @@ function KeyboardShortcutModal() { Toggle Sidebar +
  • + + Ctrl + ` + + Toggle Console +
  • ); } diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index 39809d4b..2b0fd714 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -163,7 +163,7 @@ class IDEView extends React.Component { } else { this.props.collapseSidebar(); } - } else if (e.keyCode === 192 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) { + } else if (e.keyCode === 192 && e.ctrlKey) { e.preventDefault(); if (this.props.ide.consoleIsExpanded) { this.props.collapseConsole();