Merge pull request #1287 from shakti97/shortcut-toggle-console

Added Shortcut Toggle Console
This commit is contained in:
Cassie Tarakajian 2020-04-15 15:48:31 -04:00 committed by GitHub
commit 46a8d60c63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

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

View file

@ -163,6 +163,13 @@ class IDEView extends React.Component {
} else {
this.props.collapseSidebar();
}
} else if (e.keyCode === 192 && e.ctrlKey) {
e.preventDefault();
if (this.props.ide.consoleIsExpanded) {
this.props.collapseConsole();
} else {
this.props.expandConsole();
}
}
}