Skip to content

Commit 46a8d60

Browse files
authored
Merge pull request #1287 from shakti97/shortcut-toggle-console
Added Shortcut Toggle Console
2 parents a951b29 + 0f8b489 commit 46a8d60

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

client/modules/IDE/components/KeyboardShortcutModal.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ function KeyboardShortcutModal() {
8080
</span>
8181
<span>Toggle Sidebar</span>
8282
</li>
83+
<li className="keyboard-shortcut-item">
84+
<span className="keyboard-shortcut__command">
85+
Ctrl + `
86+
</span>
87+
<span>Toggle Console</span>
88+
</li>
8389
</ul>
8490
);
8591
}

client/modules/IDE/pages/IDEView.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ class IDEView extends React.Component {
163163
} else {
164164
this.props.collapseSidebar();
165165
}
166+
} else if (e.keyCode === 192 && e.ctrlKey) {
167+
e.preventDefault();
168+
if (this.props.ide.consoleIsExpanded) {
169+
this.props.collapseConsole();
170+
} else {
171+
this.props.expandConsole();
172+
}
166173
}
167174
}
168175

0 commit comments

Comments
 (0)