added toggle console keyboard shortcut to keyboard shortcut overlay

This commit is contained in:
shakti97 2020-04-05 13:46:07 +05:30
parent d666d17e9c
commit 0f8b489af2
2 changed files with 7 additions and 1 deletions

View file

@ -80,6 +80,12 @@ function KeyboardShortcutModal() {
</span> </span>
<span>Toggle Sidebar</span> <span>Toggle Sidebar</span>
</li> </li>
<li className="keyboard-shortcut-item">
<span className="keyboard-shortcut__command">
Ctrl + `
</span>
<span>Toggle Console</span>
</li>
</ul> </ul>
); );
} }

View file

@ -163,7 +163,7 @@ class IDEView extends React.Component {
} else { } else {
this.props.collapseSidebar(); 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(); e.preventDefault();
if (this.props.ide.consoleIsExpanded) { if (this.props.ide.consoleIsExpanded) {
this.props.collapseConsole(); this.props.collapseConsole();